n8n TOTP nodeConfigure TOTP in n8n.
A one-time code is just another value a workflow can produce on demand. The n8n TOTP node generates a time-based one-time password, the short code that expires after a few seconds. One operation, 3 options, one credential holding a secret and a label. Built for anyone automating a step that asks for a code.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n TOTP node do in a workflow?
The n8n TOTP node produces a time-based one-time password and hands it to the next node as workflow data. It ships with n8n, it exposes a single operation, and it authenticates with a credential holding a secret and a label. You drop it between a step that needs a fresh code and the step that consumes one, and it fills that gap without any custom scripting.
It never starts a workflow on its own. Something upstream has to fire first, a Schedule Trigger on a fixed rhythm, a Webhook (a URL another system calls to start the run), or the trigger of a tool you already automate. The TOTP node then runs on each incoming item and returns its code for that item.
Calling an endpoint that asks for a code. Put the node right before HTTP Request and reference the generated value with an expression, the {{ $json.field }} syntax n8n uses to pull a value out of the previous node. The brief here documents the code itself and its shape, so keep the call simple: one node produces, the next node sends.
Carrying the code alongside other data. Workflows rarely move a single value. Pairing TOTP with Edit Fields (Set) lets you name the field, drop everything you do not need, and keep the payload readable three months later when someone else opens the workflow.
Branching on what came back. A run that produced nothing usable should not continue as if it had. An If node after the TOTP node splits the two paths, and the failure branch can post a line to a person rather than stay silent. A short Gmail alert is enough to notice a broken run the same morning.
Two limits worth knowing before you build on it. The node has one operation and version 1 is the highest the catalog lists, so there is no hidden second mode to look for. And it does not speak HTTP: HTTP Request is the node you reach for when an API operation is missing, never for something that is not an HTTP call, and generating a code is not one. If you are still comparing platforms before committing, the n8n review covers the ground this page does not.
How do you set up the TOTP credential in n8n?
- 01
Collect the secret and the label
The credential authenticates with a secret and a label, and both come out of the authenticator setup. The Secret is the key encoded in the QR code, an arbitrary value in Base32 such as
BVDRSBXQB2ZEL5HE. The Label identifies the account, as a URI-encoded string. Generate that pair before you open n8n. - 02
Save the TOTP credential
In n8n, open the Credentials menu and create a TOTP credential, meaning a stored set of connection details the instance reuses across workflows. Paste the Secret, then the Label, and save. Secret and label is the only supported authentication method here, so there is no OAuth screen and no scope to review.
- 03
Select it in the node
Back on the canvas, open the TOTP node and use Credential to connect with to select the credential you just saved, or to create one from the panel. The node's only operation calls for it, so nothing runs until it is set. Once it is, the same credential serves every TOTP node in the instance.
What can the TOTP node do?
The TOTP node exposes one operation. For each one: the node as you configure it in n8n, the required fields, and our field notes.
Operations index
Generate secret
generateSecretWhat you see in n8n
Notes & use cases
The node's only operation, the one that produces the time-based one-time password. No parameter is required, so a node dropped in with its defaults already returns a code. The Options collection opens with Add option; whatever you skip keeps its default value.
Key parameters
- Algorithm: the HMAC hashing algorithm,
SHA1by default, withSHA224,SHA256,SHA384,SHA512and theSHA3-224toSHA3-512family also available. - Digits: how many digits the generated code holds, 6 unless you change it.
- Period: how many seconds the code stays valid, 30 by default.
Need help automating TOTP with n8n?
A person reads every message.
TOTP and n8n, the questions that come up
01Is the TOTP node included in n8n, on Cloud and self-hosted?
02What do you need for the n8n TOTP node to work?
03What are the limits of this node?
04When do you use this node instead of HTTP Request?
05n8n or Make for this kind of step?
Get our weekly integration tips.
No spam. Unsubscribe anytime.

