Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

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
NameRequiredDescriptionDefault
sequence_idYesSequence ID
contact_idsNoArray of contact IDs to add
contact_emailsNoArray of contact emails to add
mailbox_idNoMailbox ID to send from (optional)

Implementation Reference

  • 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}`,
          },
        ],
      };
    }
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/masridigital/apollo.io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server