get_subscriber_activity
Retrieve subscriber activity data for automation emails in Mailchimp to monitor engagement and track email campaign performance.
Instructions
Get subscriber activity for an automation email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | The workflow ID of the automation | |
| email_id | Yes | The email ID within the automation | |
| subscriber_hash | Yes | The subscriber hash |
Implementation Reference
- src/services/mailchimp.ts:178-186 (handler)Core handler function that executes the Mailchimp API request to retrieve subscriber activity for a specific automation email queue entry.async getSubscriberActivity( workflowId: string, emailId: string, subscriberHash: string ): Promise<any> { return await this.makeRequest( `/automations/${workflowId}/emails/${emailId}/queue/${subscriberHash}/activity` ); }
- src/tools/index.ts:154-171 (schema)Defines the input schema for the get_subscriber_activity tool, specifying parameters workflow_id, email_id, and subscriber_hash.inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, subscriber_hash: { type: "string", description: "The subscriber hash", }, }, required: ["workflow_id", "email_id", "subscriber_hash"], },
- src/tools/index.ts:151-172 (registration)Registers the get_subscriber_activity tool in the getToolDefinitions array, including name, description, and input schema.{ name: "get_subscriber_activity", description: "Get subscriber activity for an automation email", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, subscriber_hash: { type: "string", description: "The subscriber hash", }, }, required: ["workflow_id", "email_id", "subscriber_hash"], }, },
- src/tools/index.ts:707-720 (handler)Dispatches the tool call to the MailchimpService.getSubscriberActivity method and formats the response.case "get_subscriber_activity": const activity = await service.getSubscriberActivity( args.workflow_id, args.email_id, args.subscriber_hash ); return { content: [ { type: "text", text: JSON.stringify(activity, null, 2), }, ], };