Skip to content
FlowHubFluxonLab
W
General Automationfree

Complete Guide to Setting Up and Generating TOTP Codes in n8n 🔐

by AmirHossein MnasouriZadeadapted from n8n official workflow galleryUpdated Aug 2026
Share Post Share
MaWhen clicking ‘Test workflow’When clicking ‘…ToTOTP1
1/5
STEPS · 1
Run manually by an operator

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:[email protected]?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. 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:[email protected] Save the Credential After entering the information, click Save to save the Credential.

Tags

n8nreference-only
CategoryGeneral Automation
Triggermanual
Complexitysimple
Nodes2
AddedJan 4, 2025
free

Using the Merge Node - Merge by Key

This is an example of how you can make Merge by Key work. The “Data 1” and “Data 2” nodes simply provide mock data. You can replace them with your own data sources. Then the “Convert Data” nodes are important. They make sure that the different array items are actually different items in n8n. After that, you have then the merge with the merged data.

by mike
free

Write JSON to Disk (Binary)

The “Write Binary File” expects binary data. The JSON data is, however, JSON ;) There should really be a node that allows moving data around between both of them. For now, it can be done with a Function-Node. At least till a proper one is in place. The first node is example data, wich you can customize or replace. The second node named “Make Binary” is the important one with the custom code which makes the data binary and writes it to the correct location.

by mike
free

Webhook returning XML

Receives data from an incoming HTTP Request (set up to use respond to webhook node) Create dummy data Convert JSON to XML which gets returned Respond to Webhook which returns the data and the content type of the data

by Jan Oberhauser