Complete guide to setting up and generating TOTP codes in n8n
Setting Up and Generating TOTP Step 1: Receive QR Code and Extract the Link 1. Receive the QR Code from the 2FA service After enabling two-factor authenticat...
🔌 Nodes & Integrations Used (1)
📖 Implementation & Setup Guide
Setting Up and Generating TOTP
Step 1: Receive QR Code and Extract the Link
**1. Receive the QR Code from the 2FA service** After enabling two-factor authentication (2FA) on services like OpenAI, Google, GitHub, etc., a QR Code will be given to you, which you need to scan. This QR Code contains the TOTP link used to generate one-time passcodes.
**2. Extract the link from the received QR Code** To extract the link from the QR Code, use online tools. These tools will help you extract the corresponding link.
After using an online tool, the extracted link will appear in the following format:
``` otpauth://totp/ServiceName:username?secret=secret_key&issuer=ServiceName ``` For example: ``` otpauth://totp/OpenAI:amir676080@gmail.com?secret=test-test-test&issuer=OpenAI ```
Step 2: Create TOTP Credential in n8n
- **Create a new Credential**
- To use TOTP in n8n, you need to create a new **TOTP Credential**.
2. **Enter the details in the Credential** - **In the Secret field:** Enter the **secret key** (extracted from the QR Code link). For example: ``` test-test-test ```
- **In the Label field:** Enter **ServiceName:username**
- For example:
- ```
- OpenAI:amir676080@gmail.com
```
3. **Save the Credential** After entering the information, click Save to save the Credential.
Step 3: Get the TOTP Code **Click on Test Workflow** After setting up the credentials in n8n, click on Test, and the corresponding code will be delivered to you.
Output: ``` [ { "token": "720769", "secondsRemaining": 18 } ] ```
**==This code is exactly the same as the one generated by apps and services like Google Authenticator or Authy. 🔐==**
Contact me on [Telegram]: https://t.me/amir676080
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Complete_guide_to_setting_up_and_generating_TOTP_codes_in_n8n_.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related General Automation Workflows
View All in General Automation →Generate Application Copy
Production-ready n8n automation template for Generate Application Copy built by AhiXLight. Seamlessly connects Execute Workflow Trigger, OpenAI with 4 configured nodes.
2-way sync Google Contacts and Notion
Sync your Google Contacts with your Notion database. You can filter contacts by label or sync all contacts. All contact information is kept in sync between G...
2D Image to 3D Model Automation
Production-ready n8n automation template for 2D Image to 3D Model Automation built by AhiXLight. Seamlessly connects HTTP Request, Google Sheets, Google Drive with 17 configured nodes.
2 way sync assignments completion between Canvas LMS and Notion
Syncs assignments and completion states to and fro between Canvas LMS and a Notion database. Automatically triggers every 2 hours during the schoolday by def...