Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs Code Convert 2FA
🔐 Code

Generate a 2FA OTP code from a secret in RunMacro

What it does

The Convert 2FA command generates a two-factor OTP code (like Google Authenticator) from a 2FA secret key. The key comes from the clipboard or typed input; the code goes to the virtual clipboard, real clipboard, or a variable.

When to use it

  • Auto-fill a 2FA code at account login.
  • Process many accounts with 2FA enabled.
  • Generate OTP from a secret stored in a Sheet/file.

Configuration steps

  1. Add a Code › Convert 2FA command.
  2. Choose the secret source: from the clipboard or typed (secret key).
  3. Choose the output: virtual clipboard / variable / real clipboard.
  4. Use Paste from Clipboard or the variable to fill the code. Save.

Every option explained

Secret source (Clipboard / manual)

Take the 2FA secret from the clipboard, or enter the secret key directly.

Secret key

The 2FA secret string (base32). RunMacro strips spaces/dashes and uppercases it.

Output mode

Virtual clipboard, a variable (default otp), the real clipboard, or both virtual clipboard + variable.

Real example

Example: fill a 2FA code at login

  1. Set Clipboard = the account 2FA secret (or from a Sheet).
  2. Convert 2FA, source Clipboard, output to variable otp.
  3. Click the code field, Type Text {otp}.

Tips & common mistakes

The pyotp library must be installed for code generation (it warns if missing).
The OTP changes about every 30 seconds — generate and use it right away to avoid expiry.
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.