Skip to main content
Automatically fetch 2FA verification codes from email or Slack messages—no manual code entry required.
For TOTP codes from authenticator apps, see TOTP Integration.

Methods

MethodSourceUse Case
EmailGmail inboxCodes sent via email
SlackSlack workspaceCodes sent via Slack
Both methods follow the same pattern:
  1. Fetch messages from the source (email inbox or Slack channel)
  2. Extract the 2FA code from matching messages
  3. Store the code in the specified output_variable_name
  4. Use {output_variable_name} in subsequent actions to input the code

Setup

  1. Go to the Optexity dashboardIntegrations
  2. Click the desired integration → Connect
  3. Follow the prompts to grant access

Email 2FA

Fetch verification codes from email messages:
{
  "type": "action_node",
  "extraction_action": {
    "two_fa_action": {
      "action": {
        "type": "email_two_fa_action",
        "receiver_email_address": "user@example.com",
        "sender_email_address": "noreply@example.com"
      },
      "output_variable_name": "auth_code"
    }
  }
}

Properties

PropertyTypeRequiredDescription
receiver_email_addressstrYesYour email address (identifies integration)
sender_email_addressstrYesSender to filter (e.g., noreply@site.com)

Slack 2FA

Fetch verification codes from Slack messages:
{
  "type": "action_node",
  "extraction_action": {
    "two_fa_action": {
      "action": {
        "type": "slack_two_fa_action",
        "slack_workspace_domain": "mycompany.slack.com",
        "channel_name": "security-codes",
        "sender_name": "Security Bot"
      },
      "output_variable_name": "auth_code"
    }
  }
}

Properties

PropertyTypeRequiredDescription
slack_workspace_domainstrYesWorkspace domain (identifies integration)
channel_namestrYesChannel containing the 2FA messages
sender_namestrYesName of the bot/user sending the codes

Common Properties

These apply to both Email and Slack 2FA:
PropertyTypeDefaultDescription
output_variable_namestrVariable name to store the extracted code
instructionsstrNoneOptional custom instructions for code extraction
max_wait_timefloat300.0Maximum wait time in seconds
check_intervalfloat10.0Polling interval in seconds
The action polls for the 2FA code every check_interval seconds until the code arrives or max_wait_time is reached.

Using the Code

Reference the extracted code in subsequent actions:
{
  "type": "action_node",
  "interaction_action": {
    "input_text": {
      "command": "get_by_label(\"Verification Code\")",
      "input_text": "{auth_code}"
    }
  }
}