apify-webhooks-events
'Implement Apify webhooks for Actor run notifications and event-driven
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-webhooks-eventsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of apify-webhooks-events
apify-webhooks-events scores 88/100 on our quality scale, 1165th of 2,607 Automation skills we index (top 45%).
Its SKILL.md is 6.1 KB long, well organised into 14 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so apify-webhooks-events is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
apify-webhooks-events compared with similar skills
All 4 of these similar skills score higher than apify-webhooks-events; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| apify-webhooks-events (this skill)by jeremylongshore | 88 | 2.8k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.3k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.6k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 84.6k | today | MCP Server |
Frequently asked questions
- How do I install apify-webhooks-events?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-webhooks-events. The install tabs above show the steps for each supported agent. - Which AI agents does apify-webhooks-events work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is apify-webhooks-events safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is apify-webhooks-events still maintained?
- The repository was last updated 6 days ago, so apify-webhooks-events is actively maintained.
Skill content
View source on GitHubname: apify-webhooks-events description: 'Implement Apify webhooks for Actor run notifications and event-driven pipelines.
Use when setting up run completion alerts, building event-driven scraping pipelines,
or configuring ad-hoc webhooks for individual runs.
Trigger with "apify webhook", "apify events", "actor run notification",
"apify run succeeded webhook", "apify ad-hoc webhook".
' allowed-tools: Read, Write, Edit, Bash(curl:*) version: 1.5.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- scraping
- automation
- apify compatibility: Designed for Claude Code
Apify Webhooks & Events
Overview
Configure webhooks to receive notifications when Actor runs complete, fail, or time out. Apify supports both persistent webhooks (for all runs of an Actor) and ad-hoc webhooks (for a single run). Event-driven architecture is the recommended pattern for production Apify integrations.
Prerequisites
npm install apify-clientin your project (andexpressif you build an HTTP handler)- An API token in
APIFY_TOKEN— read it from the environment (process.env.APIFY_TOKEN) or passAuthorization: Bearer $APIFY_TOKENon REST calls, never hard-code it - A public HTTPS endpoint for Apify to POST to (use ngrok while developing)
- Familiarity with
apify-sdk-patterns
Event Types
| Event | Fired When |
|-------|-----------|
| ACTOR.RUN.CREATED | A new Actor run starts |
| ACTOR.RUN.SUCCEEDED | Run finishes with SUCCEEDED status |
| ACTOR.RUN.FAILED | Run finishes with FAILED status |
| ACTOR.RUN.ABORTED | Run is manually or programmatically aborted |
| ACTOR.RUN.TIMED_OUT | Run exceeds its timeout |
| ACTOR.RUN.RESURRECTED | A finished run is resurrected |
Instructions
Step 1: Create a Persistent Webhook
Persistent webhooks fire for every run of an Actor. Set condition.actorId, list
the eventTypes you care about, and shape the delivered body with
payloadTemplate:
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const webhook = await client.webhooks().create({
eventTypes: ['ACTOR.RUN.SUCCEEDED', 'ACTOR.RUN.FAILED', 'ACTOR.RUN.TIMED_OUT'],
condition: { actorId: 'YOUR_ACTOR_ID' },
requestUrl: 'https://your-app.com/api/webhooks/apify',
payloadTemplate: JSON.stringify({
eventType: '{{eventType}}',
actorRunId: '{{actorRunId}}',
defaultDatasetId: '{{resource.defaultDatasetId}}',
status: '{{resource.status}}',
statusMessage: '{{resource.statusMessage}}',
}),
isAdHoc: false,
});
console.log(`Webhook created: ${webhook.id}`);
The full payload template (all run fields) and the complete variable table are in payload templates & local testing.
Step 2: Use Ad-Hoc Webhooks for Single Runs
Ad-hoc webhooks are created at run time and fire only for that specific run — pass
a webhooks array when starting the Actor:
const run = await client.actor('username/my-actor').start(
{ startUrls: [{ url: 'https://example.com' }] },
{
webhooks: [{
eventTypes: ['ACTOR.RUN.SUCCEEDED', 'ACTOR.RUN.FAILED'],
requestUrl: 'https://your-app.com/api/webhooks/apify',
}],
},
);
The equivalent REST/curl form is in payload templates & local testing.
Step 3: Handle the Webhook
Your endpoint must return a 2xx within 30 seconds, so acknowledge immediately and
process asynchronously. On SUCCEEDED, fetch the dataset via defaultDatasetId; on
FAILED/TIMED_OUT, pull the run log and alert:
app.post('/api/webhooks/apify', async (req, res) => {
res.status(200).json({ received: true }); // ack first
try {
await processWebhook(req.body); // switch on eventType, fetch dataset, alert
} catch (error) {
console.error('Webhook processing failed:', error);
}
});
The full processWebhook switch (dataset fetch, log tail, oncall alerting) is in
full implementation.
Step 4: Make Processing Idempotent, Chain Pipelines, and Manage Webhooks
Apify may deliver a webhook more than once, so dedupe on
${actorRunId}:${eventType} before doing work. You can also chain Actors (Stage 1
SUCCEEDED → start Stage 2) and manage the webhook lifecycle (list, update,
delete, inspect dispatches). All three patterns — idempotent processing,
event-driven pipeline, and lifecycle management — are in
full implementation.
Output
- A created webhook returns its
id(persistent webhooks are visible underclient.webhooks().list(); ad-hoc webhooks are scoped to one run) - On each matching event, Apify POSTs the rendered
payloadTemplateJSON to yourrequestUrl client.webhook(id).dispatches().list()returns the delivery history — each entry carries astatus,createdAt, and the endpoint'sresponseStatusso you can confirm delivery or diagnose retries
Examples
- Persistent + ad-hoc webhook creation — Steps 1 and 2 above
- Full handler, idempotency, pipeline chaining, lifecycle management — full implementation
- Payload template variables, REST/
curlcreation, and local testing with ngrok — payload templates & local testing
Error Handling
| Issue | Cause | Solution | |-------|-------|----------| | Webhook not delivered | URL unreachable | Verify HTTPS, check firewall | | Duplicate processing | Webhook retry on non-2xx | Implement idempotency | | Slow processing | Handler takes >30s | Respond 200 immediately, process async | | Missing data in payload | Wrong template vars | Check template variable spelling | | Webhook disabled | Too many failures | Re-enable in Console or via API |
Resources
Next Steps
For performance optimization, see apify-performance-tuning.
Related Skills
Agent-Reach
86.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.6k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Scrapling
84.6k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
