Instantly campaign

From gethouston/houston · View interactive version

Instantly campaign is an AI agent skill from the GitHub repository gethouston/houston. Create a paused cold email campaign in Instantly with all leads loaded and all sending accounts attached. I read your locked sequence, sanitize bodies (Instantly drops bodies that contain a literal ampersand - documented bug), bulk-load up to 1000 leads per call, and configure the schedule with a ti

How to use this skill

Skill file

Instantly Campaign

Create a fully-loaded, paused cold email campaign in Instantly. I take a locked sequence file plus a verified-contacts file, build the campaign through the Instantly REST API, work around two known bugs (timezone enum restrictions and the ampersand body-drop bug), bulk-load all the leads in one call, and attach every connected sending account. The campaign always ends in paused status. You hit Activate when you're ready.

When to use

When NOT to use

Connections I need

If Instantly isn't connected I stop and ask you to connect it.

Information I need

Steps

<!-- houston-workflow:v1 -->

  1. Read inputs. Parse the sequence file into {subject, body} per email. Read the contacts file into a list of {firstName, fullName, email, company, title, linkedinUrl, personalizationFields}. Sanity-check that every email is non-empty and every body is non-empty.
  1. Sanitize bodies. Strip every & character from each email body. Instantly's body-store quietly drops bodies that contain a literal ampersand - the campaign creates fine, but the body uploads as empty and your campaign sends blank emails. Replace & with and. Document this in the Instantly campaign description so future-you remembers why.
  1. List sending accounts. Call Instantly's list_accounts via Composio. If the user named specific accounts, filter to those. If "all" (the default), keep them all.
  1. Pick a schedule. Use the schedule from config/context-ledger.json defaults. The timezone field is the easy one to get wrong - Instantly's timezone enum is restricted and doesn't accept all IANA zones. Safe choices:
  1. Create the campaign. POST to Instantly's create_campaign endpoint with:
  1. Verify all step bodies are non-empty after create. Re-fetch the new campaign via get_campaign and assert that each step's body is non-empty. If any step is empty, raise loudly - the ampersand bug bit you despite the sanitization, or there's a different field that got dropped. Do not proceed to the load step.
  1. Bulk-load leads. POST to Instantly's add_leads_to_campaign with the verified contacts. Instantly accepts up to 1000 leads per call - if you have more, page in chunks of 1000. Per-lead fields:
  1. Attach sending accounts. POST to Instantly's attach_accounts_to_campaign with the accounts from step 3. Attaching all connected accounts is the default; Instantly rotates sends across them, which improves deliverability vs. a single account.
  1. Confirm paused status. Re-fetch the campaign one more time. Assert status: "paused". If anything other than paused, log loudly to the run notes and surface to the user - Instantly should never auto-activate but if a default config slipped through, the user needs to know immediately.
  1. Append to campaigns.json. One row: {name, instantlyCampaignId, sequenceFile, leadCount, sendingAccounts, schedule, status: "paused", createdAt}.
  1. Update leads.json. For every loaded lead, set loadedToCampaignId: instantlyCampaignId on the matching email row. Read-merge-write atomically.
  1. Append to outputs.json. One row: {type: "campaign", title: "{Campaign name}", summary: "Campaign created in Instantly with {leadCount} leads, {accountCount} sending accounts. Status: PAUSED.", path: null, status: "paused", domain: "sending"}. The path: null because the campaign lives in Instantly, not on disk.
  1. Final summary to user.

Outputs

Common failure modes

| Failure | Why | Fix |

|---|---|---|

| Empty body on Instantly side after upload | A literal & was in the email body | The sanitize step strips them; if it slipped through (e.g. inside a URL), strip again and verify with get_campaign |

| Timezone rejected by create_campaign | Instantly's timezone enum is restricted | Use America/Vancouver (Pacific), America/Toronto (Eastern), Europe/Berlin (Central European); avoid Etc/GMT* |

| 401 on add_leads_to_campaign | Instantly token expired in Composio | User reconnects Instantly from the Integrations tab |

| Lead count loaded < expected | Instantly silently rejected duplicates (same email already in another campaign) | This is correct behavior; surface the diff in the run notes so the user sees which leads were skipped and why |

| Campaign created with status: "active" | I forgot to set status: "paused" on create | Always set explicitly; never trust the API default |

What I never do

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.