IN

instantly-core-workflow-a

Handles end-to-end campaign creation, lead management, and sequence scheduling via the Instantly.ai API.

Install

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

Installs to .claude/skills/instantly-core-workflow-a

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.

Build and launch an Instantly.ai cold email campaign end-to-end.
64 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Create campaigns with multi-step sequences
  • Add leads with custom personalization variables
  • Assign sending accounts to campaigns
  • Launch and monitor campaign sending status
  • Configure scheduling and daily limits

How it works

The workflow programmatically interacts with the Instantly API v2 to define campaign schedules, sequence steps, and lead assignments, followed by an activation trigger.

Inputs & outputs

You give it
Campaign configuration object
You get back
Campaign ID and activation status

When to use instantly-core-workflow-a

  • Launch cold email campaigns
  • Configure automated email sequences
  • Manage lead data for outreach

About this skill

Instantly Core Workflow A: Campaign Launch Pipeline

Overview

Build the core Instantly outreach pipeline: create a campaign with email sequences, add leads with personalization, assign sending accounts, and launch. This is the primary money-path workflow for cold email outreach via Instantly API v2.

Prerequisites

  • Completed instantly-install-auth setup
  • At least one warmed-up email account in Instantly
  • Lead data (CSV or programmatic) with email + first name at minimum
  • API key with campaigns:all and leads:all scopes

Instructions

Step 1: Create a Campaign with Sequences

import { instantly } from "./src/instantly";

interface CreateCampaignPayload {
  name: string;
  campaign_schedule: {
    start_date: string;
    end_date?: string;
    schedules: Array<{
      name: string;
      timing: { from: string; to: string };
      days: Record<string, boolean>;
      timezone: string;
    }>;
  };
  sequences: Array<{
    steps: Array<{
      type: "email";
      delay: number;
      delay_unit?: "minutes" | "hours" | "days";
      variants: Array<{ subject: string; body: string }>;
    }>;
  }>;
  daily_limit?: number;
  stop_on_reply?: boolean;
  stop_on_auto_reply?: boolean;
  email_gap?: number;
  link_tracking?: boolean;
  open_tracking?: boolean;
}

async function createCampaign() {
  const payload: CreateCampaignPayload = {
    name: "Q1 Outbound — Decision Makers",
    campaign_schedule: {
      start_date: "2026-04-01",
      schedules: [
        {
          name: "Business Hours",
          timing: { from: "09:00", to: "17:00" },
          days: { "1": true, "2": true, "3": true, "4": true, "5": true, "0": false, "6": false },
          timezone: "America/New_York",
        },
      ],
    },
    // sequences array takes ONE element — add steps inside it
    sequences: [
      {
        steps: [
          {
            type: "email",
            delay: 0, // first email — no delay
            variants: [
              {
                subject: "{{firstName}}, quick question about {{companyName}}",
                body: `Hi {{firstName}},\n\nI noticed {{companyName}} is scaling its outbound — we help teams like yours book 3x more meetings without adding headcount.\n\nWorth a 15-min call this week?\n\nBest,\n{{senderName}}`,
              },
              {
                subject: "Idea for {{companyName}}",
                body: `Hey {{firstName}},\n\nSaw that {{companyName}} is growing fast. We helped [similar company] increase reply rates by 40%.\n\nOpen to a quick chat?\n\n{{senderName}}`,
              },
            ],
          },
          {
            type: "email",
            delay: 3,
            delay_unit: "days",
            variants: [
              {
                subject: "Re: {{firstName}}, quick question about {{companyName}}",
                body: `Hi {{firstName}},\n\nJust following up on my last note. Would love to share how we helped [company] with a similar challenge.\n\nHappy to work around your schedule.\n\n{{senderName}}`,
              },
            ],
          },
          {
            type: "email",
            delay: 4,
            delay_unit: "days",
            variants: [
              {
                subject: "Re: {{firstName}}, quick question about {{companyName}}",
                body: `Hi {{firstName}},\n\nI know you're busy — just wanted to check if improving outbound results is a priority right now.\n\nIf not, no worries at all. If so, I'd love 15 minutes.\n\nBest,\n{{senderName}}`,
              },
            ],
          },
        ],
      },
    ],
    daily_limit: 50,
    stop_on_reply: true,
    stop_on_auto_reply: false,
    email_gap: 120,        // seconds between emails
    link_tracking: false,  // disable for better deliverability
    open_tracking: true,
  };

  const campaign = await instantly<{ id: string; name: string; status: number }>(
    "/campaigns",
    { method: "POST", body: JSON.stringify(payload) }
  );

  console.log(`Campaign created: ${campaign.name} (${campaign.id})`);
  return campaign;
}

Step 2: Add Leads to the Campaign

interface Lead {
  email: string;
  first_name?: string;
  last_name?: string;
  company_name?: string;
  website?: string;
  phone?: string;
  personalization?: string;
  custom_variables?: Record<string, string>;
}

async function addLeads(campaignId: string, leads: Lead[]) {
  // POST /api/v2/leads — one at a time
  // For bulk: POST /api/v2/leads with list_id or loop
  const results = [];

  for (const lead of leads) {
    const created = await instantly("/leads", {
      method: "POST",
      body: JSON.stringify({
        campaign: campaignId,
        email: lead.email,
        first_name: lead.first_name,
        last_name: lead.last_name,
        company_name: lead.company_name,
        website: lead.website,
        personalization: lead.personalization,
        custom_variables: lead.custom_variables,
        skip_if_in_workspace: true,  // avoid duplicates
        verify_leads_on_import: true,
      }),
    });
    results.push(created);
  }

  console.log(`Added ${results.length} leads to campaign ${campaignId}`);
  return results;
}

// Example lead data
const sampleLeads: Lead[] = [
  {
    email: "[email protected]",
    first_name: "Jane",
    last_name: "Smith",
    company_name: "Acme Corp",
    custom_variables: { companyName: "Acme Corp", senderName: "Alex" },
  },
  {
    email: "[email protected]",
    first_name: "Bob",
    last_name: "Johnson",
    company_name: "TechStart",
    custom_variables: { companyName: "TechStart", senderName: "Alex" },
  },
];

Step 3: Map Sending Accounts to Campaign

async function assignAccounts(campaignId: string) {
  // Get available warmed-up accounts
  const accounts = await instantly<{ email: string; warmup_status: string }[]>(
    "/accounts?limit=50"
  );

  const warmedUp = accounts.filter((a) => a.warmup_status === "active");
  console.log(`Found ${warmedUp.length} warmed-up accounts`);

  // Check current account-campaign mappings
  for (const account of warmedUp.slice(0, 3)) {
    const mappings = await instantly(
      `/account-campaign-mappings/${encodeURIComponent(account.email)}?limit=10`
    );
    console.log(`${account.email} mapped to ${Array.isArray(mappings) ? mappings.length : 0} campaigns`);
  }

  // Accounts are assigned to campaigns in the Instantly dashboard or
  // via the PATCH campaign endpoint with email_list
  await instantly(`/campaigns/${campaignId}`, {
    method: "PATCH",
    body: JSON.stringify({
      email_list: warmedUp.slice(0, 3).map((a) => a.email),
    }),
  });

  console.log(`Assigned ${Math.min(3, warmedUp.length)} accounts to campaign`);
}

Step 4: Launch the Campaign

async function launchCampaign(campaignId: string) {
  // Activate (start) the campaign
  await instantly(`/campaigns/${campaignId}/activate`, { method: "POST" });
  console.log(`Campaign ${campaignId} is now ACTIVE`);

  // Verify sending status
  const status = await instantly<{ sending: boolean; reason?: string }>(
    `/campaigns/${campaignId}/sending-status`
  );
  console.log(`Sending status:`, status);
}

// Full pipeline
async function main() {
  const campaign = await createCampaign();
  await addLeads(campaign.id, sampleLeads);
  await assignAccounts(campaign.id);
  await launchCampaign(campaign.id);
  console.log("\nCampaign launched successfully!");
}

main().catch(console.error);

Key API Endpoints Used

MethodPathPurpose
POST/campaignsCreate campaign with sequences
PATCH/campaigns/{id}Update campaign settings
POST/campaigns/{id}/activateStart sending
POST/campaigns/{id}/pauseStop sending
GET/campaigns/{id}/sending-statusCheck if actively sending
POST/leadsAdd a lead to campaign
GET/accountsList email accounts
GET/account-campaign-mappings/{email}Check account assignments

Error Handling

ErrorCauseSolution
400 Bad Request on createInvalid schedule or sequence formatEnsure days keys are strings "0"-"6", timing is HH:MM
Campaign stuck in DraftNo sending accounts assignedAssign via PATCH /campaigns/{id} with email_list
Leads not receiving emailsAccounts not warmed upEnable warmup first (see instantly-core-workflow-b)
422 on lead addDuplicate email in workspaceSet skip_if_in_workspace: true
Low open ratesPoor subject lines or spam folderDisable link tracking, test with inbox placement

Resources

Next Steps

For account warmup and analytics, see instantly-core-workflow-b.

When not to use it

  • When sending accounts are not warmed up
  • When lead data lacks required fields

Prerequisites

Instantly.ai accountWarmed-up email accountAPI key with campaigns:all scope

Limitations

  • Sequences are limited to one array per campaign
  • Sending accounts must be pre-warmed

How it compares

This automates the entire campaign setup process, avoiding the manual configuration required in the Instantly web dashboard.

Compared to similar skills

instantly-core-workflow-a side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
instantly-core-workflow-a (this skill)026dReviewIntermediate
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