TOTP consultants

We can help you automate your business with TOTP and hundreds of other systems to improve efficiency and productivity. Get in touch if you’d like to discuss implementing TOTP.

Integration And Tools Consultants

TOTP

About TOTP

The TOTP (Time-based One-Time Password) node in n8n generates and validates time-based authentication codes within your workflows. TOTP is the same technology behind authenticator apps like Google Authenticator and Authy — it produces a short-lived numeric code that changes every 30 seconds, tied to a shared secret key. This node lets you incorporate that security mechanism directly into your automation pipelines.

The most common use case is automated authentication with services that require two-factor authentication (2FA). If your workflow needs to log into a system that demands a TOTP code, this node generates that code programmatically, eliminating the need for someone to manually open an authenticator app and type in numbers. This is essential for unattended automation that interacts with secured APIs or portals.

For businesses concerned about system integration security, the TOTP node also enables you to build your own 2FA verification flows. You can generate TOTP secrets for users, validate codes they submit, and enforce time-based authentication as part of custom approval workflows or secure form submissions.

Security and compliance are non-negotiable for industries like finance, healthcare, and legal services. If your automation workflows need to interact with secured systems or you want to add 2FA to your internal processes, our consulting team can help you design workflows that meet your compliance requirements without creating manual bottlenecks.

TOTP FAQs

Frequently Asked Questions

What is TOTP and how does it work?

Why would I need TOTP in an automation workflow?

Can I use this node to build my own 2FA system?

How secure is the TOTP node for production use?

What is the time window for a TOTP code?

Can I use the TOTP node with services like AWS, GitHub, or Google?

How it works

We work hand-in-hand with you to implement TOTP

Step 1

Obtain Your TOTP Secret Key

Get the TOTP secret key from the service you need to authenticate with. This is usually provided during 2FA setup as a text string or QR code. If you are building your own 2FA flow, generate a new secret using a standard TOTP library.

Step 2

Store the Secret Securely in n8n

Add the TOTP secret as a credential in n8n rather than hardcoding it in the workflow. This keeps the secret encrypted at rest and limits access to authorised workflows. Never store TOTP secrets in plain text or in workflow notes.

Step 3

Add the TOTP Node to Your Workflow

Place the TOTP node in your workflow where you need to generate or validate a code. For authentication flows, position it just before the node that submits login credentials to the secured service.

Step 4

Configure the Node for Generation or Validation

Set the node to either generate a code (for authenticating with external services) or validate a code (for verifying user-submitted codes in your own 2FA flow). Map the secret key from your stored credential to the node’s secret field.

Step 5

Use the Generated Code in Your Authentication Flow

Connect the TOTP output to the node that performs the login or API call. Map the generated code to the 2FA field in the authentication request. Ensure the workflow executes quickly so the code is still valid when submitted — TOTP codes expire after 30 seconds.

Step 6

Test and Handle Timing Edge Cases

Test the workflow end-to-end to verify codes are accepted by the target service. If you encounter timing issues where codes expire before submission, check for delays in upstream nodes and optimise the workflow to minimise execution time between code generation and use.

Transform your business with TOTP

Unlock hidden efficiencies, reduce errors, and position your business for scalable growth. Contact us to arrange a no-obligation TOTP consultation.