Salta ai contenuti

Quickstart — n8n self-hosted

Questi contenuti non sono ancora disponibili nella tua lingua.

You need: Docker, a SynapsAI account on GROWTH or above, and — to receive replies — a public HTTPS address for your n8n (SynapsAI only calls https:// on port 443, never a private address).

Do steps 1 and 2 of the n8n Cloud quickstart: mint an sk_live_ key with the scopes you need and enable the agent’s API channel, keeping its signing secret.

The quickest way for a trial is a tunnel. With cloudflared:

Terminal window
cloudflared tunnel --url http://localhost:5678
# → https://<random>.trycloudflare.com

Then start n8n with that address as its webhook URL:

Terminal window
docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 \
-e WEBHOOK_URL=https://<random>.trycloudflare.com/ \
-e N8N_COMMUNITY_PACKAGES_ENABLED=true \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n

A tunnel makes your whole n8n reachable from the internet: create the n8n owner account before you share the URL, and stop the tunnel when you are done.

In production put n8n behind your own domain and TLS (a reverse proxy such as Caddy or nginx) and set WEBHOOK_URL to it.

Open http://localhost:5678 → Settings → Community nodes → Install → n8n-nodes-synapsai → Install.

(Or, with Docker: docker exec -it n8n sh -c "cd ~/.n8n/nodes && npm install n8n-nodes-synapsai" and restart.)

Same as n8n Cloud, steps 3–4: create the SynapsAI API credential (API key, agent signing secret), add SynapsAI → Agent → Ask with Wait for Reply on, and execute. The reply arrives at your tunnel URL, the signature is checked, and the node resumes with the answer. With Wait for Reply on, the node adds a reserved _n8n metadata field to bind the reply to this execution; do not set that key yourself. The field counts toward metadata’s 20-key and 2 KB JSON limits, leaving at most 19 of your own keys while waiting.

When connecting an AI Agent, use SynapsAI Tool (read-only) and a key without campaigns:write or contacts:write scopes.

Import a workflow in Workflows → Import from File, then add the credentials and external service connections it needs:

Any n8n version can do it with built-in nodes:

  1. HTTP Request — POST https://connect.synapsai.app/v1/agents/<agentKey>/messages, header Authorization: Bearer <key>, JSON body {"externalUserId": "demo-1", "text": "Hi!", "callbackUrl": "{{ $execution.resumeUrl }}"}.
  2. Wait — Resume: On Webhook Call, HTTP method POST.
  3. The Wait node outputs SynapsAI’s message.replied body; check X-Synapsai-Signature with a Code node (see verifying signatures) before trusting it.