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,95 @@
import {
DynamicPropsValue,
PieceAuth,
Property,
createAction,
} from '@activepieces/pieces-framework';
import { StopResponse } from '@activepieces/shared';
import { StatusCodes } from 'http-status-codes';
export const replyToMcpClient = createAction({
name: 'reply_to_mcp_client',
displayName: 'Reply to MCP Client',
description: 'Return a response to the MCP client that called the tool.',
props: {
note: Property.MarkDown({
value: '**Important**: Make sure your MCP trigger has (Wait for Response) turned on.'
}),
mode: Property.StaticDropdown({
displayName: 'Mode',
description: 'Choose Simple for key-value or Advanced for JSON.',
required: true,
defaultValue: 'simple',
options: {
disabled: false,
options: [
{
label: 'Simple',
value: 'simple',
},
{
label: 'Advanced',
value: 'advanced',
},
],
},
}),
response: Property.DynamicProperties({
auth: PieceAuth.None(),
displayName: 'Response',
required: true,
refreshers: ['mode'],
props: async (propsValue) => {
const mode = propsValue['mode'] as unknown as string;
const fields: DynamicPropsValue = {};
if (mode === 'simple') {
fields['response'] = Property.Object({
displayName: 'Response',
required: true,
});
} else {
fields['response'] = Property.Json({
displayName: 'Response',
required: true,
});
}
return fields;
},
}),
respond: Property.StaticDropdown({
displayName: 'Flow Execution',
required: false,
defaultValue: 'stop',
options: {
disabled: false,
options: [
{ label: 'Stop', value: 'stop' },
{ label: 'Respond and Continue', value: 'respond' },
],
},
}),
},
async run(context) {
const { response, respond } = context.propsValue;
const stopResponse: StopResponse = {
status: StatusCodes.OK,
headers: {},
body: response
};
if (respond === 'respond') {
context.run.respond({
response: stopResponse,
});
} else {
context.run.stop({
response: stopResponse,
});
}
return stopResponse;
},
});

View File

@@ -0,0 +1,84 @@
import {
createTrigger,
Property,
TriggerStrategy,
} from '@activepieces/pieces-framework';
import { McpPropertyType } from '@activepieces/shared';
export const mcpTool = createTrigger({
name: 'mcp_tool',
displayName: 'MCP Tool',
description: 'Creates a tool that MCP clients can call to execute this flow',
props: {
toolName: Property.ShortText({
displayName: 'Name',
description: 'Used to call this tool from MCP clients like Claude Desktop, Cursor, or Windsurf',
required: true,
}),
toolDescription: Property.LongText({
displayName: 'Description',
description: 'Used to describe what this tool does and when to use it',
required: true,
}),
inputSchema: Property.Array({
displayName: 'Parameters',
description: 'Define the input parameters that this tool accepts. Parameters will be shown to users when calling the tool.',
required: false,
defaultValue: [
{
name: '',
type: McpPropertyType.TEXT,
required: true,
description: '',
},
],
properties: {
name: Property.ShortText({
displayName: 'Name',
required: true,
}),
description: Property.LongText({
displayName: 'Description',
required: false,
}),
type: Property.StaticDropdown({
displayName: 'Type',
required: true,
defaultValue: McpPropertyType.TEXT,
options: {
options: Object.values(McpPropertyType).map((type) => ({
value: type,
label: type,
})),
},
}),
required: Property.Checkbox({
displayName: 'Required',
required: true,
defaultValue: true,
}),
},
}),
returnsResponse: Property.Checkbox({
displayName: 'Wait for Response',
description: 'Keep the MCP client waiting until it receives a response via the Reply to MCP Client action',
defaultValue: false,
required: true,
}),
},
type: TriggerStrategy.WEBHOOK,
sampleData: null,
async onEnable() {
// ignore
},
async onDisable() {
// ignore
},
async run(context) {
return [context.payload];
},
async test() {
return [{}];
},
});