AP

apollo-core-workflow-b

Provides workflows to manage and automate Apollo.io email sequences via the REST API.

Install

mkdir -p .claude/skills/apollo-core-workflow-b && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2131" && unzip -o skill.zip -d .claude/skills/apollo-core-workflow-b && rm skill.zip

Installs to .claude/skills/apollo-core-workflow-b

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Implement Apollo.io email sequences and outreach workflow.
58 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Search for existing Apollo email sequences by name
  • Retrieve available email accounts for sending
  • Add contacts to a specified email sequence
  • Update contact status within a sequence (e.g., mark as finished or removed)
  • Create new contacts in Apollo CRM for sequencing

How it works

The skill uses the Apollo.io REST API to manage email sequences, allowing searching, adding contacts, updating contact status, and creating contacts within the Apollo CRM.

Inputs & outputs

You give it
Sequence ID, contact IDs, email account ID, and contact details (first name, last name, email)
You get back
Search results for sequences or contacts, email account details, or status of contact enrollment/removal

When to use apollo-core-workflow-b

  • Building automated email sequences
  • Managing outreach campaigns
  • Searching Apollo sequences via API
  • Tracking email engagement

About this skill

Apollo Core Workflow B: Email Sequences & Outreach

Overview

Build Apollo.io email sequencing and outreach automation via the REST API. Sequences in Apollo are called "emailer_campaigns" in the API. This covers listing, searching, adding contacts, tracking engagement, and managing sequence lifecycle. All endpoints require a master API key.

Prerequisites

  • Completed apollo-core-workflow-a (lead search)
  • Apollo account with Sequences feature enabled
  • Connected email account in Apollo (Settings > Channels > Email)
  • Master API key (not standard)

Instructions

Step 1: Search for Existing Sequences

// src/workflows/sequences.ts
import axios from 'axios';

const client = axios.create({
  baseURL: 'https://api.apollo.io/api/v1',
  headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.APOLLO_API_KEY! },
});

export async function searchSequences(query?: string) {
  const { data } = await client.post('/emailer_campaigns/search', {
    q_name: query,       // optional name filter
    page: 1,
    per_page: 25,
  });

  return data.emailer_campaigns.map((seq: any) => ({
    id: seq.id,
    name: seq.name,
    active: seq.active,
    numSteps: seq.num_steps ?? seq.emailer_steps?.length ?? 0,
    stats: {
      totalContacts: seq.unique_scheduled ?? 0,
      delivered: seq.unique_delivered ?? 0,
      opened: seq.unique_opened ?? 0,
      replied: seq.unique_replied ?? 0,
      bounced: seq.unique_bounced ?? 0,
    },
    createdAt: seq.created_at,
  }));
}

Step 2: Get Email Accounts for Sending

Before adding contacts to a sequence, you need the email account ID that will send the messages.

export async function getEmailAccounts() {
  const { data } = await client.get('/email_accounts');

  return data.email_accounts.map((acct: any) => ({
    id: acct.id,
    email: acct.email,
    sendingEnabled: acct.active,
    provider: acct.type,  // "gmail", "outlook", "smtp"
    dailySendLimit: acct.daily_email_limit,
  }));
}

Step 3: Add Contacts to a Sequence

The add_contact_ids endpoint enrolls contacts into an existing sequence. You must specify which email account sends the messages.

export async function addContactsToSequence(
  sequenceId: string,
  contactIds: string[],
  emailAccountId: string,
) {
  const { data } = await client.post(
    `/emailer_campaigns/${sequenceId}/add_contact_ids`,
    {
      contact_ids: contactIds,
      emailer_campaign_id: sequenceId,
      send_email_from_email_account_id: emailAccountId,
      sequence_active_in_other_campaigns: false,  // skip if already in another sequence
    },
  );

  return {
    added: data.contacts?.length ?? 0,
    alreadyInCampaign: data.contacts_already_in_campaign ?? 0,
    errors: data.not_added_contact_ids ?? [],
  };
}

Step 4: Update Contact Status in a Sequence

// Mark contacts as finished or remove them from a sequence
export async function removeContactsFromSequence(
  sequenceId: string,
  contactIds: string[],
  action: 'finished' | 'removed' = 'finished',
) {
  const { data } = await client.post('/emailer_campaigns/remove_or_stop_contact_ids', {
    emailer_campaign_id: sequenceId,
    contact_ids: contactIds,
    // "finished" marks contact as completed; "removed" fully removes
  });

  return {
    updated: data.contacts?.length ?? 0,
  };
}

Step 5: Create and Manage Contacts for Sequences

Contacts must exist in your Apollo CRM before adding to sequences. Use the Contacts API to create them.

// Create a contact in your Apollo CRM
export async function createContact(params: {
  firstName: string;
  lastName: string;
  email: string;
  title?: string;
  organizationName?: string;
  websiteUrl?: string;
}) {
  const { data } = await client.post('/contacts', {
    first_name: params.firstName,
    last_name: params.lastName,
    email: params.email,
    title: params.title,
    organization_name: params.organizationName,
    website_url: params.websiteUrl,
  });

  return {
    id: data.contact.id,
    email: data.contact.email,
    name: `${data.contact.first_name} ${data.contact.last_name}`,
  };
}

// Search your CRM contacts (not the Apollo database)
export async function searchCrmContacts(query: string) {
  const { data } = await client.post('/contacts/search', {
    q_keywords: query,
    page: 1,
    per_page: 25,
  });

  return data.contacts.map((c: any) => ({
    id: c.id,
    name: c.name,
    email: c.email,
    title: c.title,
    company: c.organization_name,
  }));
}

Step 6: Full Outreach Pipeline

async function launchOutreach(
  sequenceId: string,
  leads: Array<{ firstName: string; lastName: string; email: string; title?: string; company?: string }>,
) {
  // 1. Get a sending email account
  const accounts = await getEmailAccounts();
  const sender = accounts.find((a: any) => a.sendingEnabled);
  if (!sender) throw new Error('No active email account found');

  // 2. Create contacts in Apollo CRM (or find existing)
  const contactIds: string[] = [];
  for (const lead of leads) {
    try {
      const contact = await createContact({
        firstName: lead.firstName,
        lastName: lead.lastName,
        email: lead.email,
        title: lead.title,
        organizationName: lead.company,
      });
      contactIds.push(contact.id);
    } catch (err: any) {
      // Contact may already exist — search for them
      const existing = await searchCrmContacts(lead.email);
      if (existing.length > 0) contactIds.push(existing[0].id);
    }
  }

  // 3. Add contacts to the sequence
  const result = await addContactsToSequence(sequenceId, contactIds, sender.id);
  console.log(`Added ${result.added} contacts, ${result.alreadyInCampaign} already enrolled`);

  return result;
}

Output

  • Sequence search via POST /emailer_campaigns/search
  • Email account listing via GET /email_accounts
  • Contact enrollment via POST /emailer_campaigns/{id}/add_contact_ids
  • Contact removal via POST /emailer_campaigns/remove_or_stop_contact_ids
  • Contact creation via POST /contacts and search via POST /contacts/search
  • Full outreach pipeline: create contacts, find sender, enroll in sequence

Error Handling

ErrorCauseSolution
403 ForbiddenStandard API key usedSequence endpoints require a master API key
No email accountsInbox not connectedConnect email at Settings > Channels > Email in Apollo UI
Contact already enrolledDuplicate enrollmentCheck contacts_already_in_campaign in response
Contact not foundID does not exist in CRMCreate via POST /contacts first

Resources

Next Steps

Proceed to apollo-common-errors for error handling patterns.

When not to use it

  • When a standard API key is used for sequence endpoints

Prerequisites

Completed `apollo-core-workflow-a` (lead search)Apollo account with Sequences feature enabledConnected email account in Apollo (Settings > Channels > Email)Master API key (not standard)

Limitations

  • Sequence endpoints require a master API key
  • An active email account must be connected in Apollo
  • Contacts must exist in Apollo CRM before adding to sequences

How it compares

This skill automates the management of Apollo.io email sequences and contacts through API calls, providing programmatic control over outreach campaigns rather than manual UI interaction.

Compared to similar skills

apollo-core-workflow-b side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
apollo-core-workflow-b (this skill)227dCautionIntermediate
telegram-bot-builder1066moReviewIntermediate
mcp-integration218moReviewIntermediate
n8n-workflow-patterns162moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

mcp-integration

anthropics

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.

21123

n8n-workflow-patterns

czlonkowski

Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.

16115

n8n-code-javascript

czlonkowski

Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.

7122

n8n-expression-syntax

czlonkowski

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.

6111

n8n-node-configuration

czlonkowski

Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node_essentials and get_node_info, or learning common configuration patterns by node type.

7108

Search skills

Search the agent skills registry