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:
@@ -0,0 +1,19 @@
|
||||
import { PieceAuth } from '@activepieces/pieces-framework';
|
||||
|
||||
const markdownDescription = `
|
||||
To get your Synthesia API Key:
|
||||
|
||||
1. Go to the upper right corner of the Synthesia application and click on your account.
|
||||
2. Select **Integrations**
|
||||
3. Click on **Add** to add a new Synthesia API key.
|
||||
4. Copy this key using the 3-dot button on the right side of your API key.
|
||||
5. Paste it below.
|
||||
|
||||
**Note:** When you create an API key it will belong to your account, not the workspace.
|
||||
`;
|
||||
|
||||
export const synthesiaAuth = PieceAuth.SecretText({
|
||||
displayName: 'API Key',
|
||||
description: markdownDescription,
|
||||
required: true,
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Property } from '@activepieces/pieces-framework';
|
||||
import { synthesiaAuth } from './auth';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const templateIdDropdown = Property.Dropdown({
|
||||
auth: synthesiaAuth,
|
||||
displayName: 'Template',
|
||||
description: 'Select the template to use for video creation',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Connect your account',
|
||||
};
|
||||
}
|
||||
try {
|
||||
const apiKey = auth?.secret_text;
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://api.synthesia.io/v2/templates',
|
||||
headers: {
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
},
|
||||
});
|
||||
return {
|
||||
disabled: false,
|
||||
options: response.body.templates.map((template: any) => ({
|
||||
label: template.title,
|
||||
value: template.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Unable to fetch templates',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user