Add Activepieces integration for workflow automation

- Add Activepieces fork with SmoothSchedule custom piece
- Create integrations app with Activepieces service layer
- Add embed token endpoint for iframe integration
- Create Automations page with embedded workflow builder
- Add sidebar visibility fix for embed mode
- Add list inactive customers endpoint to Public API
- Include SmoothSchedule triggers: event created/updated/cancelled
- Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-18 22:59:37 -05:00
parent 9848268d34
commit 3aa7199503
16292 changed files with 1284892 additions and 4708 deletions

View File

@@ -0,0 +1,4 @@
export { newNote } from './new-note';
export { newMeetingScheduled } from './new-meeting-scheduled';
export { meetingRescheduled } from './meeting-rescheduled';
export { meetingCancelled } from './meeting-cancelled';

View File

@@ -0,0 +1,67 @@
import { createTrigger, TriggerStrategy, Property } from '@activepieces/pieces-framework';
export const meetingCancelled = createTrigger({
name: 'meeting_cancelled',
displayName: 'Meeting Cancelled',
description: 'Triggers when a meeting booked via the scheduling page is cancelled',
type: TriggerStrategy.WEBHOOK,
props: {
setupInstructions: Property.MarkDown({
value: `
**Quick Setup:**
1. In Avoma: **Settings > Integrations > Webhooks**
2. **Webhook URL:** \`{{webhookUrl}}\`
3. **Event Type:** Select **"MEETING_BOOKED_VIA_SCHEDULER_CANCELED"**
4. **HTTP Method:** POST
5. **Content Type:** application/json
**Note:** Requires admin permissions in Avoma.
`,
}),
},
sampleData: {
booker_email: 'client@example.com',
cancel_reason: 'Schedule conflict - need to reschedule for next week',
conference_link: 'https://zoom.us/j/123456789',
created: '2019-08-24T14:15:22Z',
event_end_time: '2019-08-24T15:15:22Z',
event_start_time: '2019-08-24T14:15:22Z',
event_type: 'MEETING_BOOKED_VIA_SCHEDULER_CANCELED',
invitee_details: {
email: 'client@example.com',
locale: 'en-US',
name: 'John Client',
tz: 'America/New_York'
},
invitee_responses: [
{
question: 'What would you like to discuss?',
response: 'Product demo and pricing discussion'
},
{
question: 'Company size?',
response: '50-100 employees'
}
],
meeting_uuid: '65fb768c-30b9-4a9a-999f-5dab85e66635',
modified: '2019-08-24T16:30:22Z',
organizer_email: 'sales@company.com',
organizer_timezone: 'America/New_York',
purpose: 'Sales Demo',
scheduling_page_link: 'https://meet.avoma.com/sales-demo',
subject: 'Product Demo - John Client (Cancelled)',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
},
async onEnable(context) {
// Manual setup - no programmatic registration needed
},
async onDisable(context) {
// Manual setup - users manage webhooks in Avoma UI
},
async run(context) {
return [context.payload.body];
}
});

View File

@@ -0,0 +1,67 @@
import { createTrigger, TriggerStrategy, Property } from '@activepieces/pieces-framework';
export const meetingRescheduled = createTrigger({
name: 'meeting_rescheduled',
displayName: 'Meeting Rescheduled',
description: 'Triggers when a scheduled meeting is rescheduled',
type: TriggerStrategy.WEBHOOK,
props: {
setupInstructions: Property.MarkDown({
value: `
**Quick Setup:**
1. In Avoma: **Settings > Integrations > Webhooks**
2. **Webhook URL:** \`{{webhookUrl}}\`
3. **Event Type:** Select **"MEETING_BOOKED_VIA_SCHEDULER_RESCHEDULED"**
4. **HTTP Method:** POST
5. **Content Type:** application/json
**Note:** Requires admin permissions in Avoma.
`,
}),
},
sampleData: {
booker_email: 'client@example.com',
cancel_reason: null,
conference_link: 'https://zoom.us/j/123456789',
created: '2019-08-24T14:15:22Z',
event_end_time: '2019-08-25T15:15:22Z',
event_start_time: '2019-08-25T14:15:22Z',
event_type: 'MEETING_BOOKED_VIA_SCHEDULER_RESCHEDULED',
invitee_details: {
email: 'client@example.com',
locale: 'en-US',
name: 'John Client',
tz: 'America/New_York'
},
invitee_responses: [
{
question: 'What would you like to discuss?',
response: 'Product demo and pricing discussion'
},
{
question: 'Company size?',
response: '50-100 employees'
}
],
meeting_uuid: '65fb768c-30b9-4a9a-999f-5dab85e66635',
modified: '2019-08-24T16:30:22Z',
organizer_email: 'sales@company.com',
organizer_timezone: 'America/New_York',
purpose: 'Sales Demo',
scheduling_page_link: 'https://meet.avoma.com/sales-demo',
subject: 'Product Demo - John Client (Rescheduled)',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
},
async onEnable(context) {
// Manual setup - no programmatic registration needed
},
async onDisable(context) {
// Manual setup - users manage webhooks in Avoma UI
},
async run(context) {
return [context.payload.body];
}
});

View File

@@ -0,0 +1,67 @@
import { createTrigger, TriggerStrategy, Property } from '@activepieces/pieces-framework';
export const newMeetingScheduled = createTrigger({
name: 'new_meeting_scheduled',
displayName: 'New Meeting Scheduled',
description: 'Triggers when a meeting is booked via one of your Avoma scheduling pages',
type: TriggerStrategy.WEBHOOK,
props: {
setupInstructions: Property.MarkDown({
value: `
**Quick Setup:**
1. In Avoma: **Settings > Integrations > Webhooks**
2. **Webhook URL:** \`{{webhookUrl}}\`
3. **Event Type:** Select **"MEETING_BOOKED_VIA_SCHEDULER"**
4. **HTTP Method:** POST
5. **Content Type:** application/json
**Note:** Requires admin permissions in Avoma.
`,
}),
},
sampleData: {
booker_email: 'client@example.com',
cancel_reason: null,
conference_link: 'https://zoom.us/j/123456789',
created: '2019-08-24T14:15:22Z',
event_end_time: '2019-08-24T15:15:22Z',
event_start_time: '2019-08-24T14:15:22Z',
event_type: 'MEETING_BOOKED_VIA_SCHEDULER',
invitee_details: {
email: 'client@example.com',
locale: 'en-US',
name: 'John Client',
tz: 'America/New_York'
},
invitee_responses: [
{
question: 'What would you like to discuss?',
response: 'Product demo and pricing discussion'
},
{
question: 'Company size?',
response: '50-100 employees'
}
],
meeting_uuid: '65fb768c-30b9-4a9a-999f-5dab85e66635',
modified: '2019-08-24T14:15:22Z',
organizer_email: 'sales@company.com',
organizer_timezone: 'America/New_York',
purpose: 'Sales Demo',
scheduling_page_link: 'https://meet.avoma.com/sales-demo',
subject: 'Product Demo - John Client',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
},
async onEnable(context) {
// Manual setup - no programmatic registration needed
},
async onDisable(context) {
// Manual setup - users manage webhooks in Avoma UI
},
async run(context) {
return [context.payload.body];
}
});

View File

@@ -0,0 +1,94 @@
import { createTrigger, TriggerStrategy, Property } from '@activepieces/pieces-framework';
export const newNote = createTrigger({
name: 'new_note',
displayName: 'New Note',
description:
'Triggers when notes are successfully generated for meetings or calls',
type: TriggerStrategy.WEBHOOK,
props: {
setupInstructions: Property.MarkDown({
value: `
**Quick Setup:**
1. In Avoma: **Settings > Integrations > Webhooks**
2. **Webhook URL:** \`{{webhookUrl}}\`
3. **Event Type:** Select **"AINOTE"**
4. **HTTP Method:** POST
5. **Content Type:** application/json
**Note:** Requires admin permissions in Avoma.
`,
}),
},
sampleData: {
action_items: [
{
action_item: 'Follow up with client on project timeline',
company: 'Avoma',
email: 'john.doe@avoma.com',
name: 'John Doe'
}
],
ai_notes: '<h2>Participants</h2><ul><li><p>Avoma: John Doe</p></li></ul>',
ai_notes_txt: 'Participants: Avoma: John Doe',
attendees: [
{
email: 'user@example.com',
name: 'John Doe',
response_status: 'accepted',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
}
],
audio_ready: true,
audio_url: 'http://example.com',
created: '2019-08-24T14:15:22Z',
duration: 3600,
end_at: '2019-08-24T14:15:22Z',
event_type: 'AINOTE',
is_call: true,
is_internal: false,
meeting_url:
'https://app.avoma.com/meeting/aa380fc2-725d-4ef8-909c-c595c0e62bcd',
modified: '2019-08-24T14:15:22Z',
notes_ready: true,
organizer_email: 'user@example.com',
organizer_name: 'John Doe',
privacy: 'private',
processing_status: 'completed',
insights: {
filler_wpm: [],
longest_monologue: {},
patience: [],
sentiment: {},
speaker_mapping: {},
talk_stats: {},
wpm: []
},
purpose: {
label: 'Sales Call',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
},
recording_uuid: '3e256a03-2cdd-4fe9-823b-2b61bb25d916',
start_at: '2019-08-24T14:15:22Z',
state: 'completed',
subject: 'Weekly Team Meeting',
transcript_ready: true,
transcription_uuid: '4753c6bf-25a6-45a1-8d86-0af7c8bde615',
transcription_vtt_url: 'http://example.com',
uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',
video_ready: true,
video_url: 'http://example.com'
},
async onEnable(context) {
// Manual setup - no programmatic registration needed
},
async onDisable(context) {
// Manual setup - users manage webhooks in Avoma UI
},
async run(context) {
return [context.payload.body];
}
});