Tutorials / Webhook Integrations / n8n (HTTP Trigger)
n8n (HTTP Trigger)
Receive Lection webhooks with an HTTP Trigger node and fan out to workflows.
Ideal for: Self-hosted automation with code + no-code mix.
Setup Steps
- Create a workflow → add HTTP Trigger node (method POST).
- Copy the test URL and paste it into Lection’s Webhook URL (optionally set X-Lection-Secret).
- Run a test scrape to populate sample data in the node.
- Add a Split In Batches or Item Lists loop over dataset.records to insert rows into your destination.
- Activate the workflow; Lection will POST for every completed scheduled scrape.
Mapping Tips
- HTTP Trigger node exposes the JSON in {{$json}}; dataset.records is the array to loop.
- Check header X-Lection-Secret in an IF node if you set a secret.
- Use download.url for a file link; status is in run.status.
Payload highlights
- event: scheduled_scrape.completed; dataset.rowCount + dataset.records payload.
- Headers include X-Lection-Secret when provided.
Helpful links
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.