Slack, Discord & Email
Send a message about a run to Slack, Discord, or email when it finishes.
An automation that reacts to a run and sends to Slack, Discord, or email posts a ready-made message about that run. Create one with New automation and the recipe Notify me on Slack when a run fails or Email me the results, then change the channel or the outcomes if you like. For one message about several runs, with filters or an AI summary, add run steps to the automation instead. Each one has:
- Send a message when a run: succeeded, failed, timed out, or was aborted.
- Only for runs with results: skips successful runs that returned no items. Failed runs are always sent.
- Results preview: the first 0 to 5 dataset items, shown as JSON.
- Custom message (optional): shown above the run details. Variables:
{{actorName}},{{taskName}},{{status}},{{runId}},{{itemCount}},{{duration}},{{cost}},{{runUrl}},{{datasetUrl}}.
Every message shows the Actor, status, duration, result count and cost, with links to the run and its dataset in the dashboard. Send a test from the automation's page to check the setup with sample data. The automation's page also shows the delivery history, with the reason for any failed delivery.
Where messages go
- Slack: the channel you picked when you connected Slack under Settings → Connections. Change channel reconnects Slack; the new channel applies to all your Slack automations.
- Discord: a channel webhook URL. In Discord, open the channel's settings → Integrations → Webhooks → New Webhook → Copy Webhook URL. Only
https://discord.com/api/webhooks/…URLs are accepted. The URL is stored encrypted and shown masked afterwards. Messages never ping@everyoneor users. - Email: your account email works right away. Any other address gets a confirmation link first; nothing is sent to it until the link is opened. Every email has an unsubscribe link, and turning off email notifications under Settings → Notifications stops them too.
Limits: each Slack or Discord automation of this kind sends at most 20 messages a minute; each email one at most 30 emails an hour, and an account at most 100 of these emails a day. Messages over a limit are logged as failed deliveries. Slack and Discord deliveries are retried on rate limits, server errors and timeouts.
API: these automations are webhooks with a notification object instead of a requestUrl, and are listed under /v2/webhooks and /v2/automations?include=webhooks:
curl -X POST https://api.scrape.ly/v2/webhooks \
-H "Authorization: Bearer $SCRAPELY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"eventTypes": ["ACTOR.RUN.SUCCEEDED", "ACTOR.RUN.FAILED"],
"condition": { "actorId": "YOUR_ACTOR_ID" },
"description": "Discord alerts",
"notification": {
"channel": "discord",
"discordWebhookUrl": "https://discord.com/api/webhooks/…",
"onlyWithResults": true,
"previewItems": 3,
"message": "{{actorName}}: {{itemCount}} results"
}
}'channel is slack, discord, or email (with email). Responses carry notification with a masked target; the Discord URL is never returned. POST /v2/webhooks/{id}/test sends a test message. Only the run-finished events are allowed (ACTOR.RUN.SUCCEEDED, FAILED, ABORTED, TIMED_OUT). POST /v2/integrations/notifications/email/verify with { "email": "…" } sends a confirmation link, and GET /v2/integrations/notifications/email lists your addresses and their state.
Connect Slack
Connect Slack under Settings → Connections. Slack connects a workspace and one channel. Slack messages from your automations go there. You can also point an HTTP webhook at a Slack incoming-webhook URL with your own payload template.
GET /v2/integrations returns the connection status, and DELETE /v2/integrations/slack disconnects it. See Search, alerts & utilities.