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,17 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { scanFile } from './lib/actions/scan-file';
import { scanText } from './lib/actions/scan-text';
import { PieceCategory } from '@activepieces/shared';
import { gptzeroDetectAiAuth } from './lib/common/auth';
export const gptzeroDetectAi = createPiece({
displayName: 'GPTZero',
auth: gptzeroDetectAiAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/gptzero-detect-ai.png',
authors: ['sanket-a11y'],
description: 'Detect AI-generated text with GPTZero API',
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE],
actions: [scanFile, scanText],
triggers: [],
});

View File

@@ -0,0 +1,39 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
import { gptzeroDetectAiAuth } from '../common/auth';
export const scanFile = createAction({
auth: gptzeroDetectAiAuth,
name: 'scanFile',
displayName: 'Scan File',
description: 'Scan a file for AI-generated content detection',
props: {
file: Property.File({
displayName: 'File',
description: 'The file to scan for AI-generated content',
required: true,
}),
},
async run(context) {
const file = context.propsValue.file;
const formData = new FormData();
const fileBuffer = Buffer.from(file.base64, 'base64');
const mimeType = file.extension
? `application/${file.extension}`
: 'application/octet-stream';
const blob = new Blob([fileBuffer], { type: mimeType });
formData.append('files', blob, file.filename);
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: 'https://api.gptzero.me/v2/predict/files',
headers: {
'x-api-key': context.auth.secret_text,
},
body: formData,
});
return response.body;
},
});

View File

@@ -0,0 +1,34 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
import { gptzeroDetectAiAuth } from '../common/auth';
export const scanText = createAction({
auth: gptzeroDetectAiAuth,
name: 'scanText',
displayName: 'Scan Text',
description: 'Scan text content for AI-generated content detection',
props: {
text: Property.LongText({
displayName: 'Text',
description: 'The text content to scan for AI-generated content',
required: true,
}),
},
async run(context) {
const payload = {
document: context.propsValue.text,
};
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: 'https://api.gptzero.me/v2/predict/text',
headers: {
'x-api-key': context.auth.secret_text,
'content-type': 'application/json',
},
body: payload,
});
return response.body;
},
});

View File

@@ -0,0 +1,7 @@
import { PieceAuth } from '@activepieces/pieces-framework';
export const gptzeroDetectAiAuth = PieceAuth.SecretText({
displayName: 'GPTZero API Key',
description: 'https://app.gptzero.me/app/api to get your API key',
required: true,
});