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

  1. Import the workflow

    In n8n, open Workflows, Import from file, and select summarize-url.json.

  2. Add the shared secret

    Create a Header Auth credential with the header name X-Gateway-Secret and a long random secret as its value. Select it in Receive paid request.

  3. Attach a chat model

    Attach your own chat model credential to Chat model, or replace that node with another chat model.

  4. Activate it

    The production URL ends in /webhook/summarize-url.

  5. 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_url this way, with N8N_WEBHOOK_URL and GATEWAY_SHARED_SECRET. For gateway setup, see Container image.

What a buyer sees

Casen8n answersBuyer receivesPayment
Valid public https URL200200 with { url, summary }settled
URL fails the check (http, IP, local)400502 BACKEND_ERROR (status 400)none
Page or model call fails502502 BACKEND_ERROR (status 502)none
Missing or wrong secret403502 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 page disables 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 in Set service options.
  • The URL check requires an https:// URL with a dotted domain name. It rejects IP literals and blocks the .local, .localhost, .internal, .lan and .home.arpa suffixes 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