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 MailerLite from '@mailerlite/mailerlite-nodejs';
import { createAction } from '@activepieces/pieces-framework';
import { mailerLiteAuth } from '../auth';
import { mailerLiteCommon } from '../common';
export const removeSubscriberFromGroupAction = createAction({
auth: mailerLiteAuth,
name: 'remove_subscriber_from_group',
classification: 'WRITE',
displayName: 'Remove Subscriber from Group',
description: 'Remove a subscriber from a group.',
audience: 'both',
aiMetadata: {
description:
'Unassign a MailerLite subscriber from a group, given the subscriber ID and group ID. Use this to remove a contact from a specific list/group without deleting the subscriber. Idempotent: removing a subscriber who is no longer in the group succeeds and leaves membership unchanged.',
idempotent: true,
},
propertyGroups: [
{
key: 'membership',
display: 'section',
label: 'Membership',
icon: 'users',
props: ['subscriberId', 'subscriberGroupId'],
},
],
props: {
subscriberId: mailerLiteCommon.subscriberId(true),
subscriberGroupId: mailerLiteCommon.subscriberGroupId(true),
},
async run(context) {
const client = new MailerLite({ api_key: context.auth.secret_text });
const response = await client.groups.unAssignSubscriber(
context.propsValue.subscriberId!,
context.propsValue.subscriberGroupId!,
);
return response.data;
},
});