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 { createAction } from '@activepieces/pieces-framework';
import { senderAuth } from '../../auth';
import { senderAiProps } from '../../common/ai-props';
import { senderApi } from '../../common/api';
import { senderUtils } from '../../common/utils';
import { senderDeleteSubscribersOutputSchema } from '../../output-schemas';
export const senderDeleteSubscribersAction = createAction({
auth: senderAuth,
name: 'sender_delete_subscribers',
outputSchema: senderDeleteSubscribersOutputSchema,
displayName: 'Delete Subscribers',
description: 'Deletes one or more subscribers.',
audience: 'ai',
classification: 'DESTRUCTIVE',
aiMetadata: {
description:
'Deletes the listed subscribers from the Sender account, removing them from every group. To stop emails but keep the contact, use Update Subscriber with Email Status set to Unsubscribed instead.',
idempotent: false,
},
props: {
subscribers: senderAiProps.subscribers({
required: true,
description: 'Email addresses of the subscribers to delete, e.g. ["[email protected]"].',
}),
},
async run(context) {
return await senderApi.deleteSubscribers({
auth: context.auth,
subscribers: senderUtils.requiredStringList({
value: context.propsValue.subscribers,
propName: 'Subscriber Emails',
}),
});
},
});