Deploy
n8n workflow
Sell web page summaries through the gateway with an n8n template. Configure the workflow and understand buyer responses and limits.
deploy/n8n/summarize-url.json sells web page summaries through the gateway using standard n8n nodes. At the demo price, an agent pays 0.02 USDC for a short summary of a public HTTPS URL. The workflow was tested on n8n 2.47.6.
Setup
- Import the workflow
In n8n, open Workflows, Import from file, and select
summarize-url.json. - Add the shared secret
Create a Header Auth credential with the header name
X-Gateway-Secretand a long random secret as its value. Select it inReceive paid request. - Attach a chat model
Attach your own chat model credential to
Chat model, or replace that node with another chat model. - Activate it
The production URL ends in
/webhook/summarize-url. - Put the gateway in front
Deploy a gateway with a resource that calls that URL and sends the same secret. The testnet demo defines
summarize_urlthis way, withN8N_WEBHOOK_URLandGATEWAY_SHARED_SECRET. For gateway setup, see Container image.
What a buyer sees
| Case | n8n answers | Buyer receives | Payment |
|---|---|---|---|
| Valid public https URL | 200 | 200 with { url, summary } | settled |
| URL fails the check (http, IP, local) | 400 | 502 BACKEND_ERROR (status 400) | none |
| Page or model call fails | 502 | 502 BACKEND_ERROR (status 502) | none |
| Missing or wrong secret | 403 | 502 BACKEND_ERROR (status 403) | none |
The gateway hides backend error bodies and reports non-2xx backend responses as BACKEND_ERROR. Under the default authorization payment flow, these failures settle nothing. With paymentFlow: upfront, payment settles before n8n runs and stays settled if the workflow fails.
Limits
Fetch pagedisables redirects and uses a 10-second timeout. It downloads the full response before the prompt expression strips markup and truncates the text to the limit inSet service options.- The URL check requires an
https://URL with a dotted domain name. It rejects IP literals and blocks the.local,.localhost,.internal,.lanand.home.arpasuffixes regardless of case. It does not check DNS results or guarantee that a destination is public: run n8n where private networks are unreachable. - The workflow sends page text to your model with a prompt to ignore instructions found there. Give the model no tools.
Based on: deploy/docs/n8n.md