instantly-incident-runbook
Execute Instantly.ai incident response procedures with triage, mitigation, and recovery. Use when responding to campaign failures, account health crises, deliverability drops, or Instantly API outages. Trigger with phrases like "instantly incident", "instantly outage", "instantly campaign failed", "instantly emergency", "instantly runbook".
What this skill does
# Instantly Incident Runbook
## Overview
Structured incident response procedures for Instantly.ai integration failures. Covers campaign pause cascades, account health crises, bounce protect triggers, webhook delivery failures, and API outages.
## Severity Levels
| Severity | Criteria | Response Time | Examples |
|----------|----------|---------------|----------|
| P1 Critical | All campaigns stopped, sending halted | 15 min | All accounts unhealthy, API 5xx |
| P2 High | Multiple campaigns affected | 1 hour | Bounce protect on key campaign, warmup degraded |
| P3 Medium | Single campaign/account issue | 4 hours | One account SMTP failure, webhook delivery issue |
| P4 Low | Non-blocking issue | Next business day | Analytics gap, cosmetic dashboard issue |
## Incident: All Campaigns in Accounts Unhealthy (-1)
### Triage
```typescript
import { InstantlyClient } from "./src/instantly/client";
const client = new InstantlyClient();
async function triageCampaignHealth() {
console.log("=== P1 TRIAGE: Campaign Health ===\n");
// 1. Get all campaigns and their statuses
const campaigns = await client.campaigns.list(100);
const statusCounts: Record<number, number> = {};
for (const c of campaigns) {
statusCounts[c.status] = (statusCounts[c.status] || 0) + 1;
}
console.log("Campaign status distribution:", statusCounts);
const unhealthy = campaigns.filter((c) => c.status === -1);
console.log(`Unhealthy campaigns: ${unhealthy.length}`);
// 2. Test ALL account vitals
const accounts = await client.accounts.list(200);
const vitals = await client.accounts.testVitals(accounts.map((a) => a.email));
const broken = (vitals as any[]).filter((v) => v.smtp_status !== "ok" || v.imap_status !== "ok");
const healthy = (vitals as any[]).filter((v) => v.smtp_status === "ok" && v.imap_status === "ok");
console.log(`\nAccounts: ${accounts.length} total, ${healthy.length} healthy, ${broken.length} broken`);
if (broken.length > 0) {
console.log("\nBroken accounts:");
for (const v of broken) {
console.log(` ${v.email}: SMTP=${v.smtp_status} IMAP=${v.imap_status} DNS=${v.dns_status}`);
}
}
return { unhealthy, broken, healthy };
}
```
### Mitigation
```typescript
async function mitigateBrokenAccounts() {
const { broken, healthy } = await triageCampaignHealth();
// Step 1: Pause broken accounts
for (const v of broken) {
try {
await client.accounts.pause(v.email);
console.log(`Paused broken account: ${v.email}`);
} catch (e: any) {
console.log(`Failed to pause ${v.email}: ${e.message}`);
}
}
// Step 2: Check if remaining healthy accounts can carry the load
if (healthy.length < 3) {
console.log("\nWARNING: Fewer than 3 healthy accounts. Campaign performance will be degraded.");
console.log("Action: Fix broken account credentials or add new accounts.");
}
// Step 3: After fixing accounts, resume them
console.log("\nTo resume fixed accounts:");
for (const v of broken) {
console.log(` POST /accounts/${encodeURIComponent(v.email)}/resume`);
}
// Step 4: Re-activate unhealthy campaigns
console.log("\nAfter accounts are fixed, reactivate campaigns:");
console.log(" POST /campaigns/{id}/activate");
}
```
## Incident: Bounce Protect Triggered (-2)
### Triage & Response
```typescript
async function handleBounceProtect() {
console.log("=== P2 TRIAGE: Bounce Protect ===\n");
const campaigns = await client.campaigns.list(100);
const bounceProtected = campaigns.filter((c) => c.status === -2);
for (const campaign of bounceProtected) {
const analytics = await client.campaigns.analytics(campaign.id);
const bounceRate = ((analytics.emails_bounced / analytics.emails_sent) * 100).toFixed(1);
console.log(`${campaign.name}: ${bounceRate}% bounce rate`);
console.log(` Sent: ${analytics.emails_sent}, Bounced: ${analytics.emails_bounced}`);
// Check lead quality
const leads = await client.leads.list({
campaign: campaign.id,
limit: 100,
});
const bouncedLeads = leads.filter((l) => l.status === -1); // Bounced
console.log(` Bounced leads: ${bouncedLeads.length} of ${leads.length} sampled`);
}
console.log("\n=== Recovery Steps ===");
console.log("1. Export remaining leads and verify emails with external service");
console.log("2. Remove bounced/invalid leads from the campaign");
console.log("3. Add verified leads back or create new campaign with clean list");
console.log("4. Re-activate campaign: POST /campaigns/{id}/activate");
console.log("\n=== Prevention ===");
console.log("- Set verify_leads_on_import: true on all lead imports");
console.log("- Use email verification: POST /api/v2/email-verification");
console.log("- Set allow_risky_contacts: false on campaign");
}
```
## Incident: Webhook Delivery Failure
### Triage & Recovery
```typescript
async function handleWebhookFailure() {
console.log("=== P3 TRIAGE: Webhook Delivery ===\n");
// Check webhook status
const webhooks = await client.webhooks.list();
for (const w of webhooks as any[]) {
console.log(`${w.name}: ${w.event_type} -> ${w.target_hook_url}`);
console.log(` Status: ${w.status || "active"}`);
}
// Check delivery summary
const summary = await client.request("/webhook-events/summary");
console.log("\nDelivery summary:", JSON.stringify(summary, null, 2));
// Check by date
const byDate = await client.request("/webhook-events/summary-by-date");
console.log("By date:", JSON.stringify(byDate, null, 2));
// Resume paused webhooks
for (const w of webhooks as any[]) {
if (w.status === "paused") {
console.log(`\nResuming paused webhook: ${w.name}`);
try {
await client.request(`/webhooks/${w.id}/resume`, { method: "POST" });
console.log(" Resumed successfully");
// Test delivery
await client.request(`/webhooks/${w.id}/test`, { method: "POST" });
console.log(" Test event sent");
} catch (e: any) {
console.log(` Failed: ${e.message}`);
}
}
}
}
```
## Incident: API Rate Limit Storm (429s)
### Response
```typescript
async function handleRateLimitStorm() {
console.log("=== P2 TRIAGE: Rate Limit Storm ===\n");
console.log("Immediate actions:");
console.log("1. Stop all automated API calls (pause cron jobs, workers)");
console.log("2. Check for runaway loops or misconfigured batch jobs");
console.log("3. Implement exponential backoff if not already in place");
// Check background jobs for stuck operations
const jobs = await client.request<Array<{
id: string; status: string; timestamp_created: string;
}>>("/background-jobs?limit=20");
const stuck = jobs.filter((j) => j.status === "in_progress");
console.log(`\nBackground jobs in progress: ${stuck.length}`);
for (const j of stuck) {
console.log(` ${j.id}: ${j.status} (created: ${j.timestamp_created})`);
}
console.log("\nRate limit guidelines:");
console.log(" - Most endpoints: standard REST limits");
console.log(" - GET /emails: 20 req/min (strictest)");
console.log(" - Implement 2^attempt second backoff on 429");
console.log(" - Add jitter to prevent thundering herd");
console.log(" - Use request queue with max concurrency of 3-5");
}
```
## Incident: Warmup Degradation
### Response
```typescript
async function handleWarmupDegradation() {
console.log("=== P2 TRIAGE: Warmup Degradation ===\n");
const accounts = await client.accounts.list(200);
const warmupData = await client.accounts.warmupAnalytics(
accounts.map((a) => a.email)
) as Array<{
email: string;
warmup_emails_sent: number;
warmup_emails_landed_inbox: number;
warmup_emails_landed_spam: number;
}>;
const degraded = warmupData.filter((w) => {
const sent = w.warmup_emails_sent || 1;
return (w.warmup_emails_landed_inbox / sent) < 0.8;
});
if (degraded.length > 0) {
console.log(`${degraded.lengthRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".