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,29 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { vlmRunAuth, vlmRunCommon } from '../common';
|
||||
import { analyzeAudioProperties } from '../common/properties';
|
||||
import { analyzeAudioSchema } from '../common/schemas';
|
||||
|
||||
export const analyzeAudio = createAction({
|
||||
auth: vlmRunAuth,
|
||||
name: 'analyzeAudio',
|
||||
displayName: 'Analyze Audio',
|
||||
description: 'Process an audio file, extracting features or transcription',
|
||||
props: analyzeAudioProperties,
|
||||
async run({ auth: apiKey, propsValue }) {
|
||||
await propsValidation.validateZod(propsValue, analyzeAudioSchema);
|
||||
|
||||
|
||||
const uploadResponse = await vlmRunCommon.uploadFile({
|
||||
apiKey:apiKey.secret_text,
|
||||
file: propsValue.audio,
|
||||
});
|
||||
|
||||
const response = await vlmRunCommon.analyzeAudio({
|
||||
apiKey:apiKey.secret_text,
|
||||
file_id: uploadResponse.id,
|
||||
});
|
||||
|
||||
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { vlmRunAuth, vlmRunCommon } from '../common';
|
||||
import { analyzeDocumentProperties } from '../common/properties';
|
||||
import { analyzeDocumentSchema } from '../common/schemas';
|
||||
|
||||
export const analyzeDocument = createAction({
|
||||
auth: vlmRunAuth,
|
||||
name: 'analyzeDocument',
|
||||
displayName: 'Analyze Document',
|
||||
description:
|
||||
'Process a document (PDF, DOCX, etc.), extracting structured data or text.',
|
||||
props: analyzeDocumentProperties,
|
||||
async run({ auth: apiKey, propsValue }) {
|
||||
await propsValidation.validateZod(propsValue, analyzeDocumentSchema);
|
||||
|
||||
const { document, domain } = propsValue;
|
||||
|
||||
const uploadResponse = await vlmRunCommon.uploadFile({
|
||||
apiKey:apiKey.secret_text,
|
||||
file: document,
|
||||
});
|
||||
|
||||
const response = await vlmRunCommon.analyzeDocument({
|
||||
apiKey:apiKey.secret_text,
|
||||
file_id: uploadResponse.id,
|
||||
domain,
|
||||
});
|
||||
|
||||
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { vlmRunAuth, vlmRunCommon } from '../common';
|
||||
import { analyzeImageProperties } from '../common/properties';
|
||||
import { analyzeImageSchema } from '../common/schemas';
|
||||
|
||||
export const analyzeImage = createAction({
|
||||
auth: vlmRunAuth,
|
||||
name: 'analyzeImage',
|
||||
displayName: 'Analyze Image',
|
||||
description:
|
||||
'Process an image (file or URL), extracting descriptions, detecting objects, etc.',
|
||||
props: analyzeImageProperties,
|
||||
async run({ auth: apiKey, propsValue }) {
|
||||
await propsValidation.validateZod(propsValue, analyzeImageSchema);
|
||||
|
||||
const { image, domain } = propsValue;
|
||||
|
||||
|
||||
const response = await vlmRunCommon.analyzeImage({
|
||||
apiKey:apiKey.secret_text,
|
||||
images: [image],
|
||||
domain,
|
||||
});
|
||||
|
||||
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { vlmRunAuth, vlmRunCommon } from '../common';
|
||||
import { analyzeVideoProperties } from '../common/properties';
|
||||
import { analyzeVideoSchema } from '../common/schemas';
|
||||
|
||||
export const analyzeVideo = createAction({
|
||||
auth: vlmRunAuth,
|
||||
name: 'analyzeVideo',
|
||||
displayName: 'Analyze Video',
|
||||
description:
|
||||
'Analyze a video file or URL, e.g. extract frames, detect content, etc.',
|
||||
props: analyzeVideoProperties,
|
||||
async run({ auth: apiKey, propsValue }) {
|
||||
await propsValidation.validateZod(propsValue, analyzeVideoSchema);
|
||||
|
||||
const { video, domain } = propsValue;
|
||||
|
||||
const uploadResponse = await vlmRunCommon.uploadFile({
|
||||
apiKey:apiKey.secret_text,
|
||||
file: video,
|
||||
});
|
||||
|
||||
const response = await vlmRunCommon.analyzeVideo({
|
||||
apiKey:apiKey.secret_text,
|
||||
file_id: uploadResponse.id,
|
||||
domain,
|
||||
});
|
||||
|
||||
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { vlmRunAuth, vlmRunCommon } from '../common';
|
||||
import { getFileProperties } from '../common/properties';
|
||||
import { getFileSchema } from '../common/schemas';
|
||||
|
||||
export const getFile = createAction({
|
||||
auth: vlmRunAuth,
|
||||
name: 'getFile',
|
||||
displayName: 'Get File',
|
||||
description: "Gets file's metadata by ID.",
|
||||
props: getFileProperties,
|
||||
async run({ auth: apiKey, propsValue }) {
|
||||
await propsValidation.validateZod(propsValue, getFileSchema);
|
||||
return await vlmRunCommon.getFile({ apiKey: apiKey.secret_text, file_id: propsValue.fileId });
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user