Automatically fetch 2FA verification codes from email, Slack, or Twilio SMS messages—no manual code entry required.
Methods
| Method | Source | Use Case |
|---|
| Email | Gmail inbox | Codes sent via email |
| Slack | Slack workspace | Codes sent via Slack |
| SMS | Twilio SMS | Codes sent via text |
All methods follow the same pattern:
- Fetch messages from the source (email inbox, Slack channel, or Twilio SMS)
- Extract the 2FA code from matching messages
- Store the code in the specified
output_variable_name
- Use
{output_variable_name} in subsequent actions to input the code
Setup
- Go to the Optexity dashboard → Integrations
- Click the desired integration → Connect
- Follow the prompts to grant access
Twilio SMS
- Log in to your Twilio account and open the Twilio Console
- Go to API Credentials and copy your Account SID and Auth Token
- Add or select a Twilio phone number that will send or receive verification texts
- Connect the Twilio integration in Optexity using the same credentials and phone number
Email 2FA
Fetch verification codes from email messages:
Properties
| Property | Type | Required | Description |
|---|
receiver_email_address | str | Yes | Recipient mailbox to search for 2FA emails |
sender_email_address | str | Yes | Sender to filter (e.g., noreply@site.com) |
integration_email_address | str | null | No | Connected integration mailbox. Defaults to receiver_email_address if omitted |
Use integration_email_address when the connected mailbox is different from the mailbox receiving the 2FA email (for example, alias/forwarding setups).
Slack 2FA
Fetch verification codes from Slack messages:
Properties
| Property | Type | Required | Description |
|---|
slack_workspace_domain | str | Yes | Workspace domain (identifies integration) |
channel_name | str | Yes | Channel containing the 2FA messages |
sender_name | str | Yes | Name of the bot/user sending the codes |
SMS 2FA
Fetch verification codes from Twilio SMS messages:
Properties
| Property | Type | Required | Description |
|---|
from_number | str | Yes | Twilio phone number sending the SMS code |
to_number | str | Yes | Destination phone number receiving the SMS |
Common Properties
These apply to Email, Slack, and SMS 2FA:
| Property | Type | Default | Description |
|---|
output_variable_name | str | — | Variable name to store the extracted code |
instructions | str | None | Optional custom instructions for code extraction |
max_wait_time | float | 300.0 | Maximum wait time in seconds |
check_interval | float | 10.0 | Polling 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: