Resources · n8n integration

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

Why automate

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.

Connect

How do you set up the TOTP credential in n8n?

  1. 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.

  2. 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.

  3. 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.

Actions

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.

01

Generate secret

generateSecret

What 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, SHA1 by default, with SHA224, SHA256, SHA384, SHA512 and the SHA3-224 to SHA3-512 family 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.
Use cases
leave all three alone when the other side expects the usual 6 digits over 30 seconds, and open the collection only when it asks for something else.
Need help

Need help automating TOTP with n8n?

A person reads every message.

FAQ

TOTP and n8n, the questions that come up

01Is the TOTP node included in n8n, on Cloud and self-hosted?
Yes. TOTP is a core node, shipped with n8n itself. There is nothing to install, no marketplace to visit and no extra cost on the n8n side. It behaves the same whether you run n8n Cloud, the hosted offer n8n operates, or your own instance on Docker or npm under the Community Edition and its Sustainable Use license. A workflow built on one runs on the other without changes. That portability matters more than it sounds: the workflow you prototype on Cloud is the same file you later move onto your own server, and the TOTP node inside it does not need to be touched.
02What do you need for the n8n TOTP node to work?
A TOTP credential, and that is the whole list. The node authenticates with a secret and a label, so you create that credential once in the Credentials menu and pick it in the node under Credential to connect with. The Secret is the Base32 key encoded in the QR code when the authenticator was set up, and the Label is the account identifier, a URI-encoded string that can carry a provider prefix. No OAuth screen, no scope to review, but nothing runs without that credential. It also needs a workflow around it: the node runs on each incoming item rather than starting a run, so a Schedule Trigger, a Webhook, or the trigger of a tool already wired in has to fire first.
03What are the limits of this node?
The node carries a single operation, Generate Secret, against a single resource, and version 1 is the highest the catalog reports. Everything configurable sits in the Options collection: Algorithm, Digits and Period, three fields and no more. There are no trigger events, so it cannot watch for anything or react to anything. Anything outside those three options is outside the node. One thing to keep in mind about versions: an older workflow can still display an earlier version of a node with fewer options, and a node never changes version on its own.
04When do you use this node instead of HTTP Request?
Whenever a code has to be produced rather than fetched. HTTP Request calls any HTTP endpoint and is the fallback when a dedicated node is missing an operation of an HTTP API, but it is never the answer for something that is not an HTTP call at all. Generating a time-based one-time password is local work, so the dedicated node is the right tool and the two are not really competing. The pairing is the useful pattern: TOTP produces the value, HTTP Request sends it onward in the same run.
05n8n or Make for this kind of step?
It depends on what you weigh most. Make is a hosted automation platform with no self-hosting option and billing per operation, while n8n runs on Cloud or on your own infrastructure. So the honest criteria are hosting, control over your data, the cost model and how the visual logic fits the way you think. If keeping data on your own server matters, self-hosting settles it. If you never want to manage a server, that argues the other way. Both build workflows visually, and neither is a bad tool here.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.