n8n
Not in the preview yet. This feature is built in the repository but is off in the v2.2.6 preview (test mode). Do not treat this page as available on a preview core. See ../preview.md and the release notes.
@dynamoprotocol/n8n-nodes-dynamo gives each n8n workflow run its own capped, revocable slice of one Dynamo budget. Paid HTTP or AI steps run under that slice's caps, and n8n gets a typed refusal at the cap. There are three nodes:
- Dynamo Budget: Open Run Allowance opens a capped child allowance for
this run under the stream your delegator credential is scoped to; Attach reads an allowance's remaining headroom.
- Dynamo Pay Step reserves the step's units first, calls your HTTP or AI
endpoint, and confirms the units only when the step succeeds. A failed step is released, so it costs nothing.
- Dynamo Trigger starts a workflow on a signed budget event: a refusal
(stream.exhausted, budget.halted, mandate.refused), an approval needed (approval.requested) or a settlement (settlement.final).
The package is not published.
Credentials
The nodes take a scoped credential only, never the owner token. The budget owner mints them with POST /owner/v1/scoped-credentials: a delegator credential ({"kind": "delegator", "streamId": "<the workflow's stream>"}) for Open Run Allowance, and a hook credential ({"kind": "hook", "budgetId": "<the budget>"}) for Dynamo Pay Step and Attach. For Dynamo Trigger, the owner registers the trigger's production URL with POST /owner/v1/webhooks/endpoints and copies the returned whsec_… secret into a Dynamo Webhook API credential.
Build it
The README documents how to build, lint and test the package from a clone; it does not yet document installing the node into your own n8n.
cd packages/n8n-nodes-dynamo
pwd
npm ci
npm run build
npm run lint
npm test
make test-n8n-node from the repository root runs these steps, then installs the packed node into a real n8n with a local core and runs three workflows: paid steps up to the cap, a failed step, and the owner token refused.
Wrap a workflow run in a budget
From the README:
- Add Dynamo Budget with Open Run Allowance, using the delegator
credential.
- Add Dynamo Pay Step, with Stream ID
{{ $('Dynamo Budget').item.json.streamId }}, using the hook credential.
An allowance accrues at its rate from the second it opens, and a paid step in that same second is refused with reason rate. Put a one-second Wait node after Dynamo Budget, or open the allowance earlier in the workflow.
What a refusal looks like
When Dynamo refuses (a cap, a policy, a freeze, a pause), the endpoint is never called. Dynamo Pay Step then either stops the workflow with the error Dynamo refused the step: <reason>, or, with Send to the Refused Output, sends the item to its Refused output as { refused: true, reason, status, streamId, units, requestRef } (nodes/DynamoPayStep/DynamoPayStep.node.ts). make test-n8n-node checks a refusal at the cap on the Refused output with reason cap.
A credential that is not a scoped credential, the owner token included, is refused before any call ("use a scoped credential"). A Dynamo Trigger delivery with a bad, stale or foreign Dynamo-Signature answers 401 and starts nothing.
Funding modes
- Control Mode (Live). The nodes never open a budget: they work on the
budget and stream the owner set up. Every test of the nodes uses a Control Mode budget.
- A funded budget. Open Run Allowance sends no signed hop, and the
nodes have no option to sign one. In a money mode the core requires signed hops by default, so the open is refused hop_unsigned and nothing is allocated. Dynamo Pay Step and Attach on a stream the owner opened are not refused, but no test runs them on a funded budget.
- Real money (Release-gated). A core runs a money mode only when its
operator allows it, and real-money settlement is not released.
Known limits
Read packages/n8n-nodes-dynamo/KNOWN-LIMITS.md in the repository before you rely on the nodes. It covers the manual webhook registration, the licence question for n8n verification, and installing into your own n8n.