- 469
Setting Up and Generating TOTP Codes with n8n
Discover how to generate TOTP codes in n8n for enhanced security, featuring step-by-step setup and seamless integration.
Discover how to generate TOTP codes in n8n for enhanced security, featuring step-by-step setup and seamless integration.
Who is this workflow for? This guide provides a comprehensive walkthrough for setting up and generating Time-based One-Time Password (TOTP) codes using n8n. By following these steps, you can enhance the security of your workflows with two-factor authentication (2FA)..
Receive the QR Code from the 2FA ServiceAfter enabling two-factor authentication (2FA) on services such as OpenAI, Google, GitHub, etc., you will receive a QR Code. This QR Code encodes the TOTP link necessary for generating one-time passcodes.
Extract the Link from the QR CodeUse an online QR Code decoder tool to extract the TOTP link from the received QR Code. The extracted link typically follows this format:
otpauth://totp/ServiceName:username?secret=secret_key&issuer=ServiceName
Example:
otpauth://totp/OpenAI:[email protected]?secret=test-test-test&issuer=OpenAI
Create a New CredentialIn n8n, navigate to the Credentials section and create a new TOTP Credential.
Enter the Credential Details
Secret: Input the secret key extracted from the QR Code link (e.g., test-test-test
).
Label: Enter a descriptive label in the format ServiceName:username
(e.g., OpenAI:[email protected]
).
Test the WorkflowWith the TOTP credential configured, execute a test workflow in n8n by clicking on Test Workflow. This action will generate a TOTP code.
Retrieve the TOTP CodeThe output will display the generated TOTP code along with the remaining validity period:
[ { "token": "720769", "secondsRemaining": 18 } ]
Note: The generated code is identical to those produced by authenticator apps like Google Authenticator or Authy.
This workflow integrates seamlessly with various platforms and services, including:
Implementing TOTP in n8n adds an extra layer of security to your automated workflows. This workflow ensures that sensitive operations are protected by dynamic, time-sensitive codes, reducing the risk of unauthorized access.
This workflow is ideal for developers, automation specialists, and IT professionals who utilize n8n for creating automated processes and seek to strengthen their security measures through two-factor authentication.
By following this guide, you have successfully set up and generated TOTP codes within n8n, enhancing the security of your automated workflows. Implementing this workflow ensures that your processes are protected with robust two-factor authentication, safeguarding your operations against unauthorized access.
For further assistance or queries, feel free to reach out on Telegram.
Streamline your workflow by marking outdated nodes and receiving summary emails. Utilize the Gmail add-on for efficient management in n8n.
Streamline your workflow by automating invoice creation from Typeform submissions to Google Sheets with this n8n template. Save time and reduce errors.
Streamline workflows by syncing Todoist tasks to Notion. Automate task tracking and project management with this efficient n8n template.
Help us find the best n8n templates
A curated directory of the best n8n templates for workflow automations.