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 handler function that executes the add_to_sequence tool by posting contact IDs to the Apollo API endpoint for adding to a sequence.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 defining parameters for the add_to_sequence tool, including sequence_id (required), contact_ids, contact_emails, and optional 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 getTools() method, defining name, description, and input schema for add_to_sequence.{ 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 case in the main tool handler switch statement that routes to the specific addToSequence method.case "add_to_sequence": return await this.addToSequence(args);