Skip to main content

Tutorials / Webhook Integrations / Slack Incoming Webhook

Slack Incoming Webhook

Send a formatted Slack attachment when a scheduled scrape completes.

Ideal for: Channel notifications with row counts and status.

Setup Steps

  1. Create a Slack incoming webhook URL for your channel.
  2. Set Lection delivery to Webhook, choose Slack integration (or leave custom), and paste the URL.
  3. Optionally set a webhook secret (not required by Slack) for internal filtering.
  4. Run a test scrape; you’ll see a message with status, rows, and a download button when available.
  5. Keep the webhook URL safe; rotate it in Slack if exposed.

Mapping Tips

  • Payload is already formatted for Slack attachments; no extra mapping needed.
  • download.url is used to render an “Open dataset” button when present.
  • Status color: green for success, red for failure.

Payload highlights

  • POST body: Slack message with text summary and attachment blocks.
  • Summary is built from schedule.name, run.status, and dataset.rowCount.

Test checklist

  • Set webhook URL and optional secret in Lection.
  • Run a scheduled scrape to capture sample data.
  • Confirm dataset.records and download.url arrive in your tool.
  • Publish/activate the workflow so production runs stay wired.