list_automation_emails
Retrieve all emails from a Mailchimp automation workflow to monitor content and track campaign sequences.
Instructions
List all emails in an automation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | The workflow ID of the automation |
Implementation Reference
- src/tools/index.ts:580-599 (handler)Tool handler that calls the service method and formats the response.case "list_automation_emails": const emails = await service.listAutomationEmails(args.workflow_id); return { content: [ { type: "text", text: JSON.stringify( emails.emails.map((e) => ({ id: e.id, position: e.position, status: e.status, subject_line: e.settings.subject_line, emails_sent: e.emails_sent, })), null, 2 ), }, ], };
- src/tools/index.ts:27-40 (registration)Tool registration including name, description, and input schema.{ name: "list_automation_emails", description: "List all emails in an automation", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, }, required: ["workflow_id"], }, },
- src/services/mailchimp.ts:111-119 (helper)Core service method implementing the API call to list automation emails.async listAutomationEmails( workflowId: string ): Promise<{ emails: MailchimpAutomationEmail[] }> { return await this.makePaginatedRequest( `/automations/${workflowId}/emails`, "send_time", "DESC" ); }