Skip to content

Run the pipeline's provider calls on n8n

What the n8n engine changes (and what it doesn't), what to set up in n8n, and how the app and the workflow trust each other.

GTM Engine runs the AI pipeline (website analysis, ICP build, lead sourcing, verification, research, qualification and sequence writing) on its built-in engine by default — nothing to set up. With the n8n engine, the app still executes every run itself; your n8n instance only performs the calls to the outside providers (AI model, website reader, lead finder, email verifier) with your credentials and network.

Results are the same on both engines: the same steps, prompts, guards, validators, stage changes, outcome codes and credit charges. Only the transport of the provider calls differs.

How it works

  1. When a run starts, the app sends a signed request to your n8n router webhook (X-GTM-Signature, HMAC-SHA256 over the timestamp and body with a shared secret).
  2. The router verifies the signature and drives the run in rounds with POST /v1/runs/:id/exchange: the app executes the next part of the run and answers with the provider requests it needs.
  3. n8n sends each request to the provider with its own credential (one HTTP Request node per service) and pushes the responses back in the next round.
  4. The app applies the responses exactly as the built-in engine would, until the run is finished.

When to choose it

  • Provider keys must stay in your infrastructure (n8n's credential store) rather than in the app.
  • Provider traffic must leave from your network or pass your own proxy or monitoring.
  • You want to see every outside call in n8n's execution log.

Set up

  1. Import the engine workflows into n8n (the router and its sub-workflows; the portable build uses only built-in n8n nodes).
  2. In the app, create an API key with the pipeline scope (Settings → API keys). In n8n, create a Header Auth credential named GTM Engine API with header Authorization and value Bearer <the key>.
  3. Add the provider credentials in n8n: Header Auth for the AI model (Gemini x-goog-api-key or Claude x-api-key), Jina Reader and Apify (Authorization: Bearer …), Query Auth for Emailable (api_key).
  4. In Settings → Pipeline engine, choose n8n workflow and paste the router's production webhook URL. In production it must be https and publicly reachable.
  5. Press Generate secret and copy it (it is shown once). In n8n, put it in the Crypto credential GTM Dispatch Secret (HMAC secret).
  6. Activate the workflows, then start a small run (for example Analyze website) and check it completes.

Rotating the secret

Rotate secret creates a new secret; for 24 hours every dispatch is signed with both the new and the previous one, so the router keeps accepting runs until you paste the new secret into n8n.

Switching back

Choose Built-in at any time; new runs then call the providers directly from the app. Credits are charged the same way on both engines.

n8n's licence restricts some commercial uses. If you run n8n for your own team this is usually fine; check n8n's terms for your case.