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,25 @@
|
||||
import { reoonEmailVerifyAuth } from '../..';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { verifyEmailsResult } from '../common/send-util';
|
||||
|
||||
export const bulkVerificationResult = createAction({
|
||||
auth: reoonEmailVerifyAuth,
|
||||
name: 'bulkVerificationResult',
|
||||
displayName: 'Get Bulk Verification Result',
|
||||
description: 'Retrieves result of bulk verification email by task ID.',
|
||||
props: {
|
||||
task_id: Property.ShortText({
|
||||
displayName: 'Task ID',
|
||||
description:
|
||||
'Provide the task ID for the bulk verification task. You can fetch this from the `Create Bulk Email Verification` action.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { task_id } = context.propsValue;
|
||||
|
||||
const response = await verifyEmailsResult(task_id, context.auth.secret_text);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
import { reoonEmailVerifyAuth } from '../..';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { verifyEmails } from '../common/send-util';
|
||||
|
||||
export const bulkEmailVerification = createAction({
|
||||
auth: reoonEmailVerifyAuth,
|
||||
name: 'bulkEmailVerificationTask',
|
||||
displayName: 'Create Bulk Email Verification',
|
||||
description: 'Creates bulk email verification task.',
|
||||
props: {
|
||||
taskName: Property.ShortText({
|
||||
displayName: 'Task Name',
|
||||
description: 'Name of the verification task',
|
||||
required: true,
|
||||
}),
|
||||
emails: Property.Array({
|
||||
displayName: 'Emails',
|
||||
description:
|
||||
'Emails to verify (You can also provide multiple emails separated by comma)',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const emails = context.propsValue.emails as string[];
|
||||
|
||||
// Each email field could be a comma separated list of emails so we need to split them
|
||||
const emailsToVerify = emails.reduce(
|
||||
(acc: string[], email: string) => [...acc, ...email.split(',')],
|
||||
[]
|
||||
);
|
||||
|
||||
const res = await verifyEmails(
|
||||
emailsToVerify,
|
||||
context.propsValue.taskName,
|
||||
context.auth.secret_text
|
||||
);
|
||||
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import { reoonEmailVerifyAuth } from '../..';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { VerifyEmailMode, verifySingleEmail } from '../common/send-util';
|
||||
|
||||
export const verifyEmail = createAction({
|
||||
auth: reoonEmailVerifyAuth,
|
||||
name: 'verifyEmail',
|
||||
displayName: 'Verify Email',
|
||||
description: 'Verify a single email',
|
||||
props: {
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
description: 'Email to verify',
|
||||
required: true,
|
||||
}),
|
||||
mode: Property.StaticDropdown<VerifyEmailMode, true>({
|
||||
displayName: 'Mode',
|
||||
defaultValue: 'power',
|
||||
description:
|
||||
'Verification mode (Power mode is more accurate but a bit slower)',
|
||||
options: {
|
||||
placeholder: 'Select a mode',
|
||||
options: [
|
||||
{
|
||||
label: 'Quick',
|
||||
value: 'quick',
|
||||
},
|
||||
{
|
||||
label: 'Power',
|
||||
value: 'power',
|
||||
},
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
return verifySingleEmail(
|
||||
context.propsValue.email,
|
||||
context.propsValue.mode,
|
||||
context.auth.secret_text
|
||||
).then((res) => res.body);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,41 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export type VerifyEmailMode = 'power' | 'quick';
|
||||
|
||||
export const verifySingleEmail = (
|
||||
email: string,
|
||||
mode: string,
|
||||
apiKey: string
|
||||
) => {
|
||||
return httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `https://emailverifier.reoon.com/api/v1/verify?email=${email}&key=${apiKey}&mode=${mode}`,
|
||||
});
|
||||
};
|
||||
|
||||
export const verifyEmails = (
|
||||
emails: string[],
|
||||
taskName: string,
|
||||
apiKey: string
|
||||
) => {
|
||||
return httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `https://emailverifier.reoon.com/api/v1/create-bulk-verification-task`,
|
||||
body: {
|
||||
name: taskName,
|
||||
emails,
|
||||
key: apiKey,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export async function verifyEmailsResult(taskId: string, apiKey: string) {
|
||||
return await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://emailverifier.reoon.com/api/v1/get-result-bulk-verification-task',
|
||||
queryParams: {
|
||||
key: apiKey,
|
||||
task_id: taskId,
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user