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,44 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod } from '@activepieces/pieces-common';
import { sevenAuth } from '../index';
import { callSevenApi } from '../common';
export const lookup = createAction({
auth: sevenAuth,
name: 'lookup',
displayName: 'Lookup Phone Numbers',
description: 'Get information about CNAM, HLR, MNP, RCS capabilities and Number formats.',
props: {
type: Property.StaticDropdown<string, true>({
options: {
options: [
{label: 'CNAM', value: 'cnam'},
{label: 'HLR', value: 'hlr'},
{label: 'Format', value: 'format'},
{label: 'MNP', value: 'mnp'},
{label: 'RCS capabilities', value: 'rcs'}
]
},
displayName: 'Type',
required: true
}),
numbers: Property.Array({
description: 'The phone numbers to look up.',
displayName: 'Numbers',
required: true
}),
},
async run(context) {
const { numbers, type } = context.propsValue;
const response= await callSevenApi({
queryParams: {
number: numbers.join(','),
},
method: HttpMethod.GET
}, `lookup/${type}`, context.auth.secret_text);
return response.body;
}
});

View File

@@ -0,0 +1,94 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod } from '@activepieces/pieces-common';
import { sevenAuth } from '../index';
import { callSevenApi } from '../common';
export const sendRcsAction = createAction({
auth: sevenAuth,
name: 'send-rcs',
displayName: 'Send RCS',
description: 'Sends a Rich Communication Services message.',
props: {
to: Property.ShortText({
displayName: 'To',
description: 'Recipient phone number for the RCS message (e.g., 49176123456789).',
required: true
}),
text: Property.LongText({
displayName: 'Message Body',
description: 'The body of the message to send.',
required: true
}),
from: Property.ShortText({
displayName: 'From',
description: 'The unique ID of your RCS agent. If not specified, the first RCS-capable sender will be used.',
required: false
}),
delay: Property.DateTime({
displayName: 'Delay',
description: 'Date/time for delayed dispatch. Format: yyyy-mm-dd hh:ii or Unix timestamp.',
required: false
}),
fallback: Property.StaticDropdown({
displayName: 'Fallback',
description: 'Alternative channel if RCS is not available. If not specified, fallback is disabled.',
required: false,
options: {
options: [
{ label: 'SMS', value: 'sms' },
{ label: 'Webview', value: 'webview' }
]
}
}),
ttl: Property.Number({
displayName: 'TTL (Time to Live)',
description: 'Validity period of the RCS in minutes. Default is 2880 (48 hours).',
required: false
}),
label: Property.ShortText({
displayName: 'Label',
description: 'Label for statistics tracking. Max 100 characters (a-z, A-Z, 0-9, .-_@).',
required: false
}),
performance_tracking: Property.Checkbox({
displayName: 'Performance Tracking',
description: 'Activate click and performance tracking for URLs (also enables URL shortener).',
required: false
}),
foreign_id: Property.ShortText({
displayName: 'Foreign ID',
description: 'Your own ID for this message (used in callbacks). Max 64 characters (a-z, A-Z, 0-9, .-_@).',
required: false
}),
},
async run(context) {
const {
to,
text,
from,
delay,
fallback,
ttl,
label,
performance_tracking,
foreign_id
} = context.propsValue;
const response = await callSevenApi({
body: {
to,
text,
from,
delay: delay ? new Date(delay).toISOString().replace('T', ' ').substring(0, 19) : undefined,
fallback,
ttl,
label,
performance_tracking,
foreign_id
},
method: HttpMethod.POST
}, 'rcs/messages', context.auth.secret_text);
return response.body;
}
});

View File

@@ -0,0 +1,43 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod } from '@activepieces/pieces-common';
import { sevenAuth } from '../index';
import { callSevenApi } from '../common';
export const sendVoiceCallAction = createAction({
auth: sevenAuth,
name: 'send-voice-call',
displayName: 'Send Voice Call',
description: 'Creates a new Text-To-Speech call to a number.',
props: {
to: Property.ShortText({
description: 'Recipient number(s) of the voice calls.',
displayName: 'To',
required: true
}),
from: Property.ShortText({
displayName: 'From',
required: false
}),
text: Property.LongText({
displayName: 'Message Body',
description: 'Text message to be read out.',
required: true
}),
},
async run(context) {
const { from, text, to } = context.propsValue;
const response= await callSevenApi({
body: {
from,
text,
to
},
method: HttpMethod.POST
}, 'voice', context.auth.secret_text);
return response.body;
}
});

View File

@@ -0,0 +1,53 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod } from '@activepieces/pieces-common';
import { sevenAuth } from '../index';
import { callSevenApi } from '../common';
export const sendSmsAction = createAction({
auth: sevenAuth,
name: 'send-sms',
displayName: 'Send SMS',
description: 'Sends an SMS to one or more recipients.',
props: {
to: Property.Array({
displayName: 'To',
description: 'Recipient numbers of the SMS.',
required: true
}),
delay: Property.DateTime({
displayName: 'Delay',
required: false
}),
flash: Property.Checkbox({
displayName: 'Flash SMS ?',
required: false
}),
from: Property.ShortText({
displayName: 'From',
required: false
}),
text: Property.LongText({
displayName: 'Message Body',
description: 'The body of the message to send.',
required: true
}),
},
async run(context) {
const { delay, flash, from, text, to } = context.propsValue;
const response = await callSevenApi({
body: {
delay: delay ? new Date(delay).toISOString().replace('T', ' ').substring(0, 19) : undefined,
flash,
from,
text,
to
},
method: HttpMethod.POST
}, 'sms', context.auth.secret_text);
return response.body;
}
});