Veefore docs

Protect n8n workflows and AI agents

Install the Veefore node in your own n8n, route protected actions through Veefore, and let Veefore verify the instance for paths around it.

This guide connects an n8n instance you operate to Veefore. Do the shared setup first (agent, tool, policy, enforcement). Integrations → n8n in the console walks through the same steps with your agent and tools. For a deployment Veefore controls, see Veefore-managed n8n.

Two things happen once it is set up:

  • Workflows and AI agents perform protected actions through the Veefore node. The gateway runs policy, risk, approval and the credential broker, and performs the call itself. The workflow never holds the provider secret.
  • Veefore verifies the instance through the n8n API: it reads workflow definitions and credential metadata and reports every path that acts outside Veefore — a direct Gmail node, a generic HTTP Request, a Code node, a provider credential stored in n8n.

What Veefore can and cannot promise on your instance

You keep administrator access to your own n8n. Anyone with editor rights can add a direct node or credential at any time; Veefore finds it on the next verification, it does not prevent it. That is why a customer-owned instance is reported Partial at best, never Enforced within scope. If you need prevention, use the managed profile.

#Requirements

  • n8n 1.x or 2.x with the public API enabled (verified on 2.43.7).
  • An n8n API key with the read scopes workflow:list, workflow:read, credential:list, user:list and securityAudit:generate. Older n8n without scoped keys works with a full key, but use a dedicated user.
  • The Veefore gateway reachable from n8n.

#Step by step

Set it up in Veefore

In the console, Integrations → n8n → Set up n8n (or Agents → Create agent → n8n or a visual builder):

  1. Choose the agent n8n acts as, or create one. Only agents made for n8n are listed; one per instance.

  2. Decide what it may do. Only this agent's own tools are shown. Add tools opens a dialog with three ways to find them; tick the actions you want and Add:

    • Browse apps: popular apps one click away, or search 280+ apps ("gmail send", "stripe refund"). No model is involved; this works on deployments without AI suggestions.
    • Describe the agent ("answers customer emails and issues refunds up to 200 USD"). Veefore's model picks apps, then actions, from the catalog. It only chooses: an action it names that is not in the catalog is dropped, so it cannot invent a field or an endpoint. Anything the catalog lacks is listed so you can import it.
    • Import OpenAPI: the URL of an API's OpenAPI 3 or Swagger 2 document (JSON or YAML), or the document pasted. Pick the operations; each becomes a tool with the spec's own fields.

    Tools are listed app by app, and each app is set up once, whatever it does. In the dialog, Select all adds every action of an app; on the page, + Actions on an app adds more of its actions later. For each app, choose who performs it with Performed by:

    • Veefore: paste the app's key once, or for an OAuth app click Sign in with … once and approve at the provider, as in n8n (Signing in with OAuth). Every new action of the app that calls the same API host uses it, and a key already saved for that host is reused, so it is never asked again. Only the sign-in methods the app supports are offered. Get a … key opens the page where the provider issues it, or n8n's page on getting it. When the API needs more than one value (a username and password, an account ID beside the token), the app says what and Enter them opens the editor. Account values in the URL, such as WhatsApp's sender phone number ID, are asked once for the app too (Fixed values). The endpoint is filled in: from the provider's OpenAPI document, or the exact call n8n makes for that action (from n8n's node definition, its source, or reviewed per action). How the key is sent (a header, the query string, the body, the URL path, basic auth, OAuth, an AWS signature) is set for each app. See Set up an action.
    • n8n: the app names the n8n credential its node runs on, with n8n's page on setting it up.

    An action only n8n can perform (WhatsApp's "send and wait for a reply", say) is marked n8n only and stays n8n's when the app is Veefore's. Switching a saved app switches its saved actions too, keeping their keys.

    Edit on an action holds the rest: endpoint and authentication, fields, name, key and risk. Save creates them. Try a decision shows what your policy would do with a call, without running it.

    Every catalog or imported tool carries its exact fields, and the card says where they came from:

    • n8n performs it: n8n's own node definitions (n8n-nodes-base and n8n's AI nodes), the same fields you see in that node, under n8n's names (sendTo, subject). When Veefore performs one of these actions, it sends these fields to the endpoint n8n calls.
    • Veefore performs it: the provider's published OpenAPI document (the catalog has Claude, Gemini, Groq, Resend, Stripe, Twilio, SendGrid, Slack, Discord, Asana, GitHub, Intercom and Brevo; import any other): exact names, types, required fields, allowed values, and whether each goes in the URL path, the query string or the body (JSON or form-encoded). Calls are checked against these fields before anything is sent.

    The actions catalog lists every action, app by app, with the call Veefore makes, how the key is sent and what to enter.

    When the catalog has an action both ways, switching who performs the app swaps in the other way's exact fields.

  3. Create the connection secret. You get a Key ID (key_…) and a Connection Secret (vf_secret_…), shown once. Creating one for an agent that already has a key replaces that key: anything using the old one stops at once.

Register the instance (recommended)

From step 4 of the same page, or Integrations → n8n — customer-owned → Add. Enter the instance URL, the read-scoped API key and the agent. The key is sealed into the credential broker and never shown again. The runtime starts Pending and Unverified.

Install the node

Once the node is on npm: Settings → Community nodes → Install n8n-nodes-veefore, or npm install n8n-nodes-veefore in ~/.n8n/nodes.

From source (before it is published, or to pin a build): in the Veefore repository,

bash
cd integrations/n8n-nodes-veefore
npm install --ignore-scripts && npm run build
mkdir -p ~/.n8n/custom/n8n-nodes-veefore
cp -R dist package.json ~/.n8n/custom/n8n-nodes-veefore/

and start n8n with N8N_CUSTOM_EXTENSIONS=~/.n8n/custom. In Docker, mount that folder and set the variable. Restart n8n; the node appears as Veefore (n8n names it CUSTOM.veefore when loaded this way).

On n8n Cloud, see n8n Cloud.

Add the credential

Add a Veefore node, then Credential → Create new credential. Paste the Key ID and Connection Secret; the Gateway URL is already https://gateway.veefore.com (change it only for a self-hosted Veefore). Saving tests the credential: it signs an assertion with the secret and lists the agent's tools, so a green test means the gateway accepted this key.

Replace direct actions

Use the Veefore node with Run Tool wherever a workflow sends mail, writes to a CRM, changes a database or calls a payment API. For AI agents, add one Veefore Tools node to the agent per app; wire the provider's tool into that node, not the agent, for any action n8n performs (how). Then delete the provider credentials from n8n that Veefore now holds.

Verify

On the runtime page, Verify now. Findings list each node and credential that acts outside Veefore with the fix. Verification re-runs every RUNTIME_VERIFY_INTERVAL_SECONDS, and a changed workflow is re-verified within two minutes.

#Who performs a tool

Every tool, for any provider, is one of two kinds. You choose per tool.

Veefore performs it n8n performs it
What happens Veefore decides, then calls the API itself Veefore decides; your n8n node on the Veefore node's Allowed output does it
The provider credential Sealed in Veefore's broker; n8n never holds it In n8n, as today
You set up The API endpoint and the credential: a bearer token; an API key in a header, the query string, the body or the URL path, with any value the API wants beside it (an account ID); a username and password; an OAuth sign-in; or an AWS access key. The catalog fills in which, for each app Nothing more
A refusal Cannot happen: Veefore never makes the call Holds because the node only runs on Allowed; anyone with editor rights can rewire it, and verification reports that
AI Agents Pick its app in Veefore Tools: the model can only act through Veefore Pick its app in Veefore Tools and wire the provider's tool into its n8n Tools input; a tool wired straight to the agent is a bypass
Use it for Any action that is one HTTPS call: about 3,000 of the catalog's actions, with a token, a key, basic auth, OAuth (Veefore renews the access token) or an AWS key Databases, queues and local steps; "send and wait for a reply"; apps that sign requests their own way or exchange the key for a token first; file uploads (the list)

Every call to a checked tool is validated against those fields before anything is sent. A missing or wrongly typed value is refused with the exact problem, for example "one of charge or payment_intent is required. Nothing was sent.", and the provider is never contacted. Path values are encoded, so a value can never change the host or add a path segment. APIs that take form bodies (Stripe, Twilio) are sent form-encoded.

For "n8n performs it", connect the provider node (Gmail, Shopify, Postgres, …) to the Veefore node's Allowed output. Verification then reports it as Runs only when Veefore allows it instead of a direct provider node. If any other path reaches that node, it is a bypass again. The credential stored in n8n is still reported, at a lower severity, because an editor could attach it elsewhere.

#The node

Operation What it does
Run Tool Pick a Tool (listed live from Veefore for this agent) and fill its fields, which come from the tool's parameter schema, or send JSON. Veefore decides and runs it.
Check Only The decision for these exact parameters, without running anything.
List Tools The tools this agent may use.
Get Approval The status of an approval, by ID.

The node has three outputs, so decisions shape the workflow instead of hiding in its data:

Output When
Allowed Veefore allowed it and it ran (or, with Check Only, would be allowed).
Refused Policy, risk or an approver refused it, the approval expired, or the tool failed. Nothing happened. Each item says why.
Needs Approval A person must approve, and When a Person Must Approve is set to continue. The item carries the approval_id.

Whether an action needs approval is decided by your policy on every call, not in n8n. By default the node waits for the decision made in Approvals, for as long as the approval is open (24 hours by default, set for the organisation), then runs the approved action once or routes to Refused. There is no timeout to set.

Every request carries the workflow ID, execution ID and node name, recorded in the audit trail. A retried step with the same request cannot act twice.

#For an AI Agent: Veefore Tools

Veefore Tools gives an AI Agent one app's actions through Veefore, and Veefore decides every call. Add it from the AI Agent's Tool input (search for "Veefore"), pick the agent's Veefore credential and the App, which shows how many actions it has and who performs it, as set in Veefore. The model gets the app's actions as tools and picks the one each request needs. Add one Veefore Tools node per app, as with n8n's own tool nodes.

Setting What it does
App One of the apps this agent may use in Veefore. Who performs it, its credential and its account values are set once there.
Actions Empty: all of the app's actions, and the model picks the one each request needs. Pick some to offer only those. Defined automatically by the model (✨) also offers all of them, with a description under it that tells the model how to choose.
Fields For an app Veefore performs: the fields its actions require, each Defined automatically by the model (✨) until you give it a value. Every other field is filled by the model too; add it under Add field to send to set it or to change what the model is told.
Purpose Why the agent takes an action. Shown to approvers and recorded with each call. Defined automatically by the model (✨) by default: the model says why with each call. Or write it, or use an expression.

The model sees each action by a name led by its app (whatsapp_business_cloud_send_message), so an agent with several apps tells them apart, with the action's description from Veefore.

Fields lists each field once for the whole app. A field only some of the app's actions have says which, for example Text Body (Send message). A ✨ field is filled by the model, and its Description is the hint the model sees; edit it to steer the model. Click × on a field to set it yourself: a value or an expression is fixed for every action that has the field, and never shown to the model. A field that is account setup, not a choice, is set once in Veefore (see Fixed values), so every workflow gets it, and it is not listed here at all.

Changing the App starts Actions and Fields afresh for the new app.

Nodes added with earlier versions keep their layout and keep working: version 1 (several actions in one node) and version 2 (one action per node, from 3.3.0). New nodes are one app per node.

#Fixed values

Some fields belong to your account, not to each call: WhatsApp's Phone number ID, an account or workspace ID in the URL. Left to the model, it guesses (one sent veefore, and Meta answered "Object with ID 'veefore' does not exist"). Set them once for the app in Integrations → n8n, when you add its actions; a new action of an app already set up gets them. On a saved tool, they are its Fixed values (in Integrations → n8n or Tools). A value in the URL that belongs to the account (a phone number ID, an account SID, a tenant or workspace) is marked Account setup, and a tool still missing one shows Set … in its row. A value in the URL that a call chooses, such as the media an action downloads, is filled by the model.

The gateway applies fixed values to every call, before policy and approval, and over anything the agent sent. They are left out of the tool's schema, so no runtime (n8n, the SDK, MCP) offers them to a model. They are account setup, not secrets: keys stay in the credential broker. For an action n8n performs, the n8n tool's own fields are the place for them.

Under Options, Wait for a Decision sets how long a call waits for a person (2 minutes by default, up to 24 hours).

For an app n8n performs, the node shows an n8n Tools input. Connect n8n's own tools for its actions (Gmail "Send a message", for example) there, not to the agent, and set their fields in those tools. For an app Veefore performs that has actions only n8n can perform, the node shows the input for those. The model sees each such tool by its own name and arguments, and n8n runs it only after Veefore allows that exact call. Veefore matches the tool's node, resource and operation to the action, and is asked about the node's own values with the arguments the model filled in.

A tool wired into n8n Tools reaches the model only through this node, and only for an action of the app that n8n performs. Anything else wired in is not offered, and the node says why in the execution's hints, as it does for an n8n action with no tool wired in for it.

The editor reuses the agent's action list for a minute, so the dropdowns open at once; a run always asks Veefore for the current list.

Veefore says What happens The model is told
Allowed It runs, once The result
Refused Nothing runs It was not allowed, and why
Needs approval, approved within Wait for a Decision (2 minutes by default, up to 24 hours) It runs, once The result
Needs approval, still undecided, Veefore performs it Veefore carries it out by itself if it is approved before the approval expires, exactly once, through the same checks It will happen once approved; nothing more is needed
Needs approval, still undecided, n8n performs it The node keeps checking the approval (every 10 seconds, then every minute) and runs the n8n tool, once, as soon as it is approved It will happen once approved; nothing more is needed
No answer from Veefore Nothing runs Why it was not done

For an action n8n performs, that follow-up lives in the n8n process: if n8n restarts before the approval, nothing runs by itself, and the user asks again once it is approved. One n8n process follows at most 200 approvals at a time; beyond that the model tells the user to ask again once it is approved. A run started after approval is not shown in the original execution's log; Veefore's Actions records it. Turn it off with Options → Do It When Approved Later: the model then tells the user to ask again once it is approved.

Before an approved request runs, Veefore checks its latest snapshot of the workflow (for a registered instance): if the workflow was removed, or the n8n tool was removed, disabled or disconnected from Veefore Tools in the meantime, it is refused and the approval stays unused. The check is as fresh as the last verification.

After n8n runs a tool Veefore allowed, the node reports the result. A tool that failed (an expired Gmail sign-in, a provider outage) shows in Actions as Failed with n8n's error, instead of looking done, and the model is told it was not done. The approval stays used: a reported failure never reopens it.

Asking again after approval needs no second approval: the gateway ties an identical request from the same agent to its approved, unused approval, which the run then uses up. Asking again before anyone decides returns the same approval instead of a new one. A request that differs in any value needs its own approval. A denial or an expiry ends it, and Approvals shows what happened.

n8n cannot stop an editor from wiring a tool straight to the agent. Workflow verification reports that as AI_TOOL_BYPASS, and reports tools wired into Veefore Tools as gated. With Fail closed, the agent's actions are refused until it is fixed.

Version 3.0.0 removed Veefore Tool (one action per node) and Veefore Guard (the removal first shipped in 2.3.0). A workflow that still has one shows it as an unknown node: replace it with Veefore Tools and pick the same app.

Authorizing is not executing

"Authorize with Veefore, then send with the Gmail node" leaves the send unmediated: nothing binds what Gmail sends to what was authorized. The verifier flags this pattern as VEEFORE_NODE_MISCONFIGURED.

#Several items in one request

"Delete every draft", "message each customer": an action Veefore performs takes several items in one call (veefore_batch, one entry per item, each with what it is, such as the draft's subject), and the model is told to use it instead of calling once per item. Every item is its own request, bound to its exact values and used once, and approvers see them as one card in Approvals, with one notice and one decision for all of them (or the ones they leave ticked). The node waits once, for Wait for a Decision, then carries out what was approved; what is still undecided is handed to Veefore, which carries it out once approved. The model is told how each item ended.

One call takes up to 100 items. A batch with an item missing a required field is refused before anything is sent, so it is never left half done.

Calls of the same action in one run join the same card while it is waiting, and a call that joins does not wait again. Calls that each wait for their own decision cannot share one: n8n runs an agent's tool calls one after another, so a call approved quickly is done before the next one asks.

#Finding things by name

An action that needs an ID (a draft's, a message's, a label's) tells the model to look it up first with the app's list or search actions, by its subject, name or other details, instead of asking the user for an ID they would not know. When the node offers nothing that can look it up, the model says so, and the execution's hints name the action to add (for Gmail's Delete a draft, Get many drafts).

Gmail's reads, when Veefore performs them, return what identifies each item, as n8n's node does:

Action Returns
Get many drafts Each draft's subject, recipients and first words, with its draftId: the ID the draft actions take (in the field n8n calls messageId)
Get a draft Its text, decoded, not Gmail's base64
Get many messages, Get many threads Subject, sender, recipients, date and first words, with n8n's filters: search, sender, read or unread, received after and before, labels

A list reads up to 100 items and says when there are more, so the model searches instead of listing everything.

#Fail closed (optional)

On the runtime's Settings, Fail closed makes the gateway refuse the agent's protected actions while the runtime is At risk or Unverified, and refuse any action from a workflow Veefore has not verified unchanged. A bypass found in one workflow then stops the agent everywhere until it is fixed or the risk is accepted. Turning it off later needs runtime:operate and step-up.

#Upgrading

Upgrade the node with Settings → Community nodes → Update, or npm install n8n-nodes-veefore@latest, then restart. The wire protocol is versioned; the gateway accepts older node versions.

#Troubleshooting

Symptom Cause
Credential test: AGENT_AUTHENTICATION_FAILED The Key ID and Connection Secret are not a pair, or the Gateway URL differs from the gateway's configured public URL (it is part of the signature).
Credential test: AGENT_IDENTITY_REVOKED The key was replaced (a new connection secret was created). Use the new Key ID and secret.
The Tool list is empty The agent has no tools. Tick some on Integrations → n8n.
RUNTIME_ENFORCEMENT_FAILED Fail closed is on and the runtime is At risk, Unverified, paused, or the workflow is unverified.
Verification: n8n rejected the API key (401) The key was revoked or rotated in n8n; replace it on the runtime's Settings.
Verification: missing scope Add the scope named in the error to the key.
The node does not appear Restart n8n after installing; with NODES_INCLUDE set, add CUSTOM.veefore or n8n-nodes-veefore.veefore.

Identity, authority, policy and enforcement for autonomous AI agents.