π¦ ClawHub
Instantly Campaign Launcher
by @zero2ai-hub
Create and launch an Instantly.ai cold email campaign with D0/D3/D8 sequences and bulk-import leads via API, no dashboard needed.
TERMINAL
clawhub install skill-instantly-campaign-launcherπ About This Skill
skill-instantly-campaign-launcher
Programmatically create an Instantly.ai cold email campaign with D0/D3/D8 sequences and bulk-import leads β all via Instantly API v2. One script, zero dashboard clicking.
What it does
1. Creates a new Instantly campaign (or finds an existing one by name) 2. Adds a 3-step D0/D3/D8 email sequence to the campaign 3. Imports leads from a JSON file (with dedup/skip for existing leads) 4. Reports imported/skipped/failed countsUse cases
Inputs
INSTANTLY_KEY β Instantly API v2 Bearer token (set as env var)scripts/campaign.config.js β campaign name, schedule, D0/D3/D8 email bodiesleads.json β array of lead objects: {email, firstName, lastName, companyName, website}Outputs
Scripts
scripts/campaign-launcher.js β main entry pointscripts/campaign.config.js β config template (edit before running)Usage
# 1. Get your Instantly API v2 token from app.instantly.ai β Settings β API Keys
export INSTANTLY_KEY=your_token_here2. Edit scripts/campaign.config.js β set campaign name, schedule, email copy
3. Create leads.json (array of lead objects)
4. Run:
node scripts/campaign-launcher.js --config scripts/campaign.config.js --leads leads.json
leads.json format
[
{ "email": "john@example.com", "firstName": "John", "lastName": "Smith", "companyName": "Acme Inc", "website": "acme.com" },
{ "email": "jane@corp.io", "firstName": "Jane", "companyName": "Corp IO" }
]
campaign.config.js format
module.exports = {
campaignName: 'My Outreach Campaign',
schedule: {
name: 'Business Hours',
timing: { from: '09:00', to: '17:00' },
days: { monday: true, tuesday: true, wednesday: true, thursday: true, friday: true, saturday: false, sunday: false },
timezone: 'America/New_York', // or Asia/Dubai, Europe/London, etc.
},
sequences: [
{ step: 1, delay: 0, subject: 'Your subject', body: 'Hi {{firstName}}, ...' },
{ step: 2, delay: 3, subject: 'Re: Your subject', body: 'Follow-up body...' },
{ step: 3, delay: 8, subject: 'Last note, {{firstName}}', body: 'Closing body...' },
],
};
Notes
POST /campaigns/:id/sequences/sequences endpoint occasionally returns 404 β add sequences manually in dashboard if this occursβ‘ When to Use
π‘ Examples
# 1. Get your Instantly API v2 token from app.instantly.ai β Settings β API Keys
export INSTANTLY_KEY=your_token_here2. Edit scripts/campaign.config.js β set campaign name, schedule, email copy
3. Create leads.json (array of lead objects)
4. Run:
node scripts/campaign-launcher.js --config scripts/campaign.config.js --leads leads.json
π Tips & Best Practices
POST /campaigns/:id/sequences/sequences endpoint occasionally returns 404 β add sequences manually in dashboard if this occurs