instantly-webhooks-events
Implement Instantly.ai webhook event handling with real API v2 event types. Use when setting up webhook endpoints, processing email events, or building CRM sync pipelines from Instantly notifications. Trigger with phrases like "instantly webhook", "instantly events", "instantly webhook handler", "handle instantly events", "instantly notifications".
What this skill does
# Instantly Webhooks & Events
## Overview
Handle Instantly API v2 webhooks for real-time email outreach event notifications. Instantly fires events when emails are sent, opened, clicked, replied to, or bounced, and when leads change interest status. Webhooks require Hypergrowth plan ($97/mo) or higher. Delivery retries: **3 times within 30 seconds** on failure.
## Prerequisites
- Instantly Hypergrowth plan or higher (required for webhooks)
- API key with `all:all` or appropriate webhook scopes
- Public HTTPS endpoint for receiving webhook payloads
- `INSTANTLY_API_KEY` environment variable set
## Webhook Event Types
| Event Type | Trigger | Key Payload Fields |
|------------|---------|-------------------|
| `email_sent` | Email delivered to recipient | `lead_email`, `campaign_id`, `step` |
| `email_opened` | Recipient opens email | `lead_email`, `campaign_id`, `open_count` |
| `email_link_clicked` | Recipient clicks a link | `lead_email`, `campaign_id`, `link_url` |
| `reply_received` | Recipient replies | `lead_email`, `campaign_id`, `reply_text` |
| `email_bounced` | Email bounces | `lead_email`, `bounce_type`, `reason` |
| `lead_unsubscribed` | Lead unsubscribes | `lead_email`, `campaign_id` |
| `campaign_completed` | All leads in campaign processed | `campaign_id`, `campaign_name` |
| `account_error` | Sending account error | `email`, `error_type` |
| `lead_interested` | Lead marked interested | `lead_email`, `campaign_id` |
| `lead_not_interested` | Lead marked not interested | `lead_email`, `campaign_id` |
| `lead_meeting_booked` | Meeting booked | `lead_email`, `campaign_id` |
| `lead_meeting_completed` | Meeting completed | `lead_email` |
| `lead_closed` | Lead closed/won | `lead_email` |
| `lead_out_of_office` | OOO reply detected | `lead_email` |
| `lead_wrong_person` | Wrong person response | `lead_email` |
| `all_events` | Subscribe to everything | Varies by event |
## Instructions
### Step 1: Create Webhook via API
```typescript
import { instantly } from "./src/instantly";
async function createWebhook() {
// Create webhook for specific events
const webhook = await instantly<{ id: string; name: string }>("/webhooks", {
method: "POST",
body: JSON.stringify({
name: "CRM Sync — Replies & Meetings",
target_hook_url: "https://api.yourapp.com/webhooks/instantly",
event_type: "reply_received",
headers: {
"X-Webhook-Secret": process.env.INSTANTLY_WEBHOOK_SECRET,
},
}),
});
console.log(`Webhook created: ${webhook.id}`);
// Create additional webhooks for other events
for (const event of ["lead_interested", "lead_meeting_booked", "email_bounced"]) {
await instantly("/webhooks", {
method: "POST",
body: JSON.stringify({
name: `CRM Sync — ${event}`,
target_hook_url: "https://api.yourapp.com/webhooks/instantly",
event_type: event,
headers: { "X-Webhook-Secret": process.env.INSTANTLY_WEBHOOK_SECRET },
}),
});
}
// Or subscribe to ALL events with one webhook
await instantly("/webhooks", {
method: "POST",
body: JSON.stringify({
name: "All Events Monitor",
target_hook_url: "https://api.yourapp.com/webhooks/instantly/all",
event_type: "all_events",
headers: { "X-Webhook-Secret": process.env.INSTANTLY_WEBHOOK_SECRET },
}),
});
}
```
### Step 2: Build Event Handler
```typescript
import express from "express";
const app = express();
app.use(express.json());
app.post("/webhooks/instantly", async (req, res) => {
// Validate secret
if (req.headers["x-webhook-secret"] !== process.env.INSTANTLY_WEBHOOK_SECRET) {
return res.status(401).json({ error: "Unauthorized" });
}
// Respond 200 immediately — Instantly retries 3x in 30s on failure
res.status(200).json({ received: true });
const { event_type, data } = req.body;
console.log(`Event: ${event_type}`, JSON.stringify(data).slice(0, 300));
try {
await routeEvent(event_type, data);
} catch (err) {
console.error(`Failed to process ${event_type}:`, err);
}
});
async function routeEvent(eventType: string, data: any) {
switch (eventType) {
case "reply_received":
await handleReply(data);
break;
case "email_bounced":
await handleBounce(data);
break;
case "lead_interested":
case "lead_meeting_booked":
case "lead_closed":
await handlePositiveOutcome(eventType, data);
break;
case "lead_unsubscribed":
await handleUnsubscribe(data);
break;
case "campaign_completed":
await handleCampaignComplete(data);
break;
case "account_error":
await handleAccountError(data);
break;
default:
console.log(`Unhandled event: ${eventType}`);
}
}
```
### Step 3: Implement Event Handlers
```typescript
async function handleReply(data: {
lead_email: string;
campaign_id: string;
reply_text: string;
}) {
console.log(`Reply from ${data.lead_email} in campaign ${data.campaign_id}`);
// Sync to CRM
await crmClient.updateContact(data.lead_email, {
status: "replied",
lastReply: data.reply_text,
lastActivity: new Date(),
});
// Notify sales team
await slackNotify("#sales-replies", {
text: `Reply from ${data.lead_email}:\n${data.reply_text.slice(0, 500)}`,
});
}
async function handleBounce(data: {
lead_email: string;
bounce_type: string;
reason: string;
}) {
console.log(`Bounce: ${data.lead_email} (${data.bounce_type})`);
if (data.bounce_type === "hard") {
// Add to global block list
await instantly("/block-lists-entries", {
method: "POST",
body: JSON.stringify({ bl_value: data.lead_email }),
});
console.log(`Added ${data.lead_email} to block list`);
}
}
async function handlePositiveOutcome(
eventType: string,
data: { lead_email: string; campaign_id: string }
) {
const statusMap: Record<string, string> = {
lead_interested: "interested",
lead_meeting_booked: "meeting_scheduled",
lead_closed: "closed_won",
};
await crmClient.updateContact(data.lead_email, {
status: statusMap[eventType] || eventType,
lastActivity: new Date(),
});
if (eventType === "lead_meeting_booked") {
await slackNotify("#sales-wins", {
text: `Meeting booked with ${data.lead_email}!`,
});
}
}
async function handleUnsubscribe(data: { lead_email: string }) {
// Add to block list to prevent future outreach across all campaigns
await instantly("/block-lists-entries", {
method: "POST",
body: JSON.stringify({ bl_value: data.lead_email }),
});
console.log(`Unsubscribed + blocked: ${data.lead_email}`);
}
async function handleCampaignComplete(data: { campaign_id: string }) {
// Pull final analytics
const analytics = await instantly(`/campaigns/analytics?id=${data.campaign_id}`);
console.log(`Campaign complete:`, analytics);
}
async function handleAccountError(data: { email: string; error_type: string }) {
console.error(`Account error: ${data.email} — ${data.error_type}`);
await slackNotify("#ops-alerts", {
text: `Instantly account error: ${data.email}\nType: ${data.error_type}`,
});
}
```
### Step 4: Manage Webhooks
```typescript
// List all webhooks
async function listWebhooks() {
const webhooks = await instantly<Array<{
id: string; name: string; event_type: string; target_hook_url: string;
}>>("/webhooks?limit=50");
for (const w of webhooks) {
console.log(`${w.id}: ${w.name} [${w.event_type}] -> ${w.target_hook_url}`);
}
}
// Test a webhook
async function testWebhook(webhookId: string) {
await instantly(`/webhooks/${webhookId}/test`, { method: "POST" });
}
// Resume a paused webhook
async function resumeWebhook(webhookId: string) {
await instantly(`/webhooks/${webhookId}/resume`, { method: "POST" });
}
// Check delivery status
async function checkDeliveryHealth() {
const summary = await instantly("/webhook-events/summary");
console.log("Webhook delivery summary:", summary);
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.