add_to_sequence
Add contacts to Apollo.io email sequences using contact IDs or email addresses to automate outreach campaigns.
Instructions
Add contacts to a sequence. Provide sequence ID and contact email addresses or contact IDs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sequence_id | Yes | Sequence ID | |
| contact_ids | No | Array of contact IDs to add | |
| contact_emails | No | Array of contact emails to add | |
| mailbox_id | No | Mailbox ID to send from (optional) |
Implementation Reference
- src/index.ts:899-917 (handler)The primary handler function for the 'add_to_sequence' tool. It sends a POST request to Apollo's API endpoint to add specified contact IDs to the given sequence ID, optionally specifying a mailbox, and returns a success message.private async addToSequence(args: any) { const response = await this.axiosInstance.post( `/emailer_campaigns/${args.sequence_id}/add_contact_ids`, { contact_ids: args.contact_ids, emailer_campaign_id: args.sequence_id, send_email_from_email_account_id: args.mailbox_id, } ); return { content: [ { type: "text", text: `Successfully added ${args.contact_ids?.length || args.contact_emails?.length || 0} contact(s) to sequence ${args.sequence_id}`, }, ], }; }
- src/index.ts:345-368 (schema)Input schema for the 'add_to_sequence' tool, defining required sequence_id and optional contact_ids, contact_emails, and mailbox_id.inputSchema: { type: "object", properties: { sequence_id: { type: "string", description: "Sequence ID", }, contact_ids: { type: "array", items: { type: "string" }, description: "Array of contact IDs to add", }, contact_emails: { type: "array", items: { type: "string" }, description: "Array of contact emails to add", }, mailbox_id: { type: "string", description: "Mailbox ID to send from (optional)", }, }, required: ["sequence_id"], },
- src/index.ts:341-369 (registration)Tool registration in the getTools() method's return array, specifying name, description, and input schema for listTools response.{ name: "add_to_sequence", description: "Add contacts to a sequence. Provide sequence ID and contact email addresses or contact IDs.", inputSchema: { type: "object", properties: { sequence_id: { type: "string", description: "Sequence ID", }, contact_ids: { type: "array", items: { type: "string" }, description: "Array of contact IDs to add", }, contact_emails: { type: "array", items: { type: "string" }, description: "Array of contact emails to add", }, mailbox_id: { type: "string", description: "Mailbox ID to send from (optional)", }, }, required: ["sequence_id"], }, },
- src/index.ts:78-79 (registration)Dispatch/registration of the tool handler in the central CallToolRequestSchema switch statement.case "add_to_sequence": return await this.addToSequence(args);