GenAiHub

Last checked 23 October 2026 — responded normally.

Upsert Lection scrape results into Google Sheets with webhook deduplication

Quick overview

Live
Open / InstallLast updated October 23, 2026

Description

Quick overview This workflow receives Lection scheduled-scrape webhook events and writes the returned dataset records into Google Sheets, deduplicating by a chosen unique column using an upsert operation. How it works Receives a POST webhook from Lection for a scheduled scrape delivery. Verifies the request by comparing the x-lection-secret header against a configured shared secret and returns 401 if it does not match. Checks that the event is scheduled_scrape.completed and that the dataset contains at least one row, otherwise returns a JSON response indicating nothing was written. Splits the incoming body.dataset.records array into individual items. Upserts each record into Google Sheets using “append or update” based on the configured matching (unique) column. Aggregates the write results and responds to Lection with a JSON payload including how many rows were written. Setup Create a Google Sheet with a header row whose column names exactly match the field names in Lection’s dataset.records. Add a Google Sheets OAuth2 credential in n8n and set the target Spreadsheet ID and sheet name in the Google Sheets node. Set the matching (unique) column used for deduplication in the Google Sheets node’s matching columns setting. Configure the expected webhook secret in the workflow (or remove the secret check) and set the same secret in Lection’s webhook delivery settings. Copy the workflow’s production webhook URL and configure it as the Webhook delivery channel for your Lection scheduled scrape, ensuring the webhook path matches your setup. Requirements A Lection account on a paid plan (webhook delivery is paid-only), with a scheduled scrape that has a stable unique column Additional info Activate the workflow and use its production webhook URL, not the test URL. Test sends from Lection are acknowledged but never written, so use Run now in Lection to check the mapping. Sheet column names are case-sensitive. If you pick the n8n destination in Lection, which has no secret field, delete the Secret matches? node. An n8n automation workflow template by Joe Laufer.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Joe Laufer

Platform

web

Pricing model

free

Categories

  • Automation

Tags

  • n8n
  • workflow
  • google-sheets

Capabilities

  • 1 nodes

Information

TypeWorkflow
Sourcen8n
AddedOctober 18, 2026

Comments

?

Others in the same category, ranked by how often they are opened.