AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { Property, createAction } from '@activepieces/pieces-framework';
import { vboutAuth } from '../auth';
import { makeClient } from '../common';
export const createEmailMarketingCampaignAction = createAction({
auth: vboutAuth,
name: 'vbout_add_email_marketing_campaign',
classification: 'WRITE',
displayName: 'Create Email Marketing Campaign',
description: 'Creates a new email campaign for specific list.',
audience: 'both',
aiMetadata: {
description: 'Creates a new VBOUT email marketing campaign targeting one or more email lists, either standard or automated type. Use to set up an email send to existing recipients. Requires recipient list(s), name, subject, sender details, and message body; not idempotent, as each call creates a separate campaign.',
idempotent: false,
},
props: {
lists: Property.MultiSelectDropdown({
auth: vboutAuth,
displayName: 'Campaign Recipients List',
required: true,
refreshers: [],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Connect your account first',
options: [],
};
}
const client = makeClient(auth.secret_text);
const res = await client.listEmailLists();
return {
disabled: false,
options: res.lists.items.map((list) => {
return {
label: list.name,
value: list.id,
};
}),
};
},
}),
name: Property.ShortText({
displayName: 'Campaign Name',
required: true,
}),
subject: Property.ShortText({
displayName: 'Campaign Subject',
required: true,
}),
type: Property.StaticDropdown({
displayName: 'Campaign Type',
required: true,
defaultValue: 'standard',
options: {
disabled: false,
options: [
{
label: 'Standard',
value: 'standard',
},
{
label: 'Automated',
value: 'automated',
},
],
},
}),
fromemail: Property.ShortText({
displayName: 'From Email',
required: true,
}),
from_name: Property.ShortText({
displayName: 'From Name',
required: true,
}),
reply_to: Property.ShortText({
displayName: 'Reply To',
required: true,
}),
body: Property.LongText({
displayName: 'Message Body',
required: true,
}),
},
async run(context) {
const { lists, name, from_name, fromemail, reply_to, subject, body, type } =
context.propsValue;
const client = makeClient(context.auth.secret_text);
return await client.addCampaign({
lists: lists.join(','),
name,
from_name,
fromemail,
reply_to,
subject,
body,
type,
});
},
});