{"product_id":"n8n-webhook-extract-json-from-web-pages-using-gaffa","title":"n8n Webhook: Extract JSON from Web Pages Using Gaffa","description":"\u003ch3\u003eExtract structured JSON from any web page—via a secured n8n webhook using Gaffa\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow exposes a secured \u003cstrong\u003eWebhook\u003c\/strong\u003e that accepts a page \u003cem\u003eURL\u003c\/em\u003e plus a \u003cem\u003efields schema\u003c\/em\u003e, then uses \u003cstrong\u003eGaffa\u003c\/strong\u003e to load the page and return \u003cstrong\u003eclean, structured JSON\u003c\/strong\u003e for exactly the fields you request (with caching support and clear error responses).\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a POST request\u003c\/strong\u003e on a webhook endpoint protected by \u003cstrong\u003eHeader Auth\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the JSON body\u003c\/strong\u003e (expects \u003ccode\u003eurl\u003c\/code\u003e, optional \u003ccode\u003eselector\u003c\/code\u003e, and a non-empty \u003ccode\u003efields\u003c\/code\u003e schema with supported types). If validation fails, it returns \u003cstrong\u003eHTTP 400\u003c\/strong\u003e with an error message.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds a Gaffa \u003ccode\u003eparse_json\u003c\/code\u003e extraction request\u003c\/strong\u003e using your requested fields.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses configurable caching\u003c\/strong\u003e via \u003ccode\u003emax_cache_age\u003c\/code\u003e to allow cached extraction results.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns extracted JSON\u003c\/strong\u003e with \u003cstrong\u003eHTTP 200\u003c\/strong\u003e and a \u003ccode\u003efrom_cache\u003c\/code\u003e flag when successful.\u003c\/li\u003e\n  \u003cli\u003eIf Gaffa cannot extract the data, it returns \u003cstrong\u003eHTTP 502\u003c\/strong\u003e with Gaffa’s error message.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS data ingestion:\u003c\/strong\u003e Turn selected fields from public or internal web pages into structured JSON for downstream automation.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLead enrichment:\u003c\/strong\u003e Extract specific attributes from a profile page using a provided selector and schema.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOps and reporting:\u003c\/strong\u003e Automate extraction of recurring page elements for dashboards or audits.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRequires the community node \u003cstrong\u003e@gaffa-dev\/n8n-nodes-gaffa\u003c\/strong\u003e in your n8n instance.\u003c\/li\u003e\n  \u003cli\u003eUses a \u003cstrong\u003eGaffa API credential\u003c\/strong\u003e (API key) and sends a \u003ccode\u003eparse_json\u003c\/code\u003e request to render and extract fields.\u003c\/li\u003e\n  \u003cli\u003eImplements \u003cstrong\u003eHeader Auth\u003c\/strong\u003e for webhook security, plus \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, and \u003cstrong\u003erespond to webhook\u003c\/strong\u003e to validate input and return 400\/200\/502 responses.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eHow to use:\u003c\/strong\u003e Create a Gaffa account, generate an API key, configure it in n8n, then POST \u003ccode\u003eapplication\/json\u003c\/code\u003e to the workflow’s production webhook with \u003ccode\u003eurl\u003c\/code\u003e, \u003ccode\u003efields\u003c\/code\u003e, and optional \u003ccode\u003eselector\u003c\/code\u003e.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46232404328627,"sku":"N8N-21057","price":45.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/lFdk_jFLSL8SsDpk6DCAo_SCortWO3.png?v=1792141826","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-extract-json-from-web-pages-using-gaffa","provider":"N8N Commerce","version":"1.0","type":"link"}