Actions45
- Manager Actions
- Mouse Actions
- Keyboard Actions
- Browser Control Actions
- Element Actions
- Image Actions
- Others Actions
- Email Actions
- Developer Actions
- General Debug Actions
Email → read_mail_code
AI-generatedSummary
Connect to an IMAP email server to search recent emails for an OTP or verification code and extract the code based on specified criteria and format.
Inputs
- Email (required) — IMAP email account address used for login and OTP retrieval.
- Password (required) — IMAP password or app-specific password for authentication.
- Mail Server — IMAP server endpoint, defaulting to imap.gmail.com.
- Email Sent To Contains — Filter string to narrow emails by From/To/Subject content.
- Code Type — Type of code to extract: numeric only or alphanumeric.
- Code Length — Expected length of the OTP code; zero allows variable length.
- Code Element XPath — Optional XPath to locate the code in the HTML content.
- Code Element Attribute — Attribute of the XPath-selected element to extract, e.g. text or href.
- Folder — Mailbox folder to scan, typically INBOX.
- Unread Only — Whether to search only unread emails (default true).
- Max Mails — Maximum number of latest emails to scan for codes.
- Debug — Enable detailed IMAP debugging logs.
- Debug Prefix — Prefix string used in debug output logs.
- Max Age Minutes — Maximum email age in minutes to include in search; omit to disable.
Output shape
a single record containing the extracted OTP code or relevant data
Returns the extracted code found in the email inbox using IMAP, based on filtering parameters. The output includes the code and metadata under the mqtt response payload. Errors are handled by throwing or via continueOnFail.
Examples
Example 1: Extract a 6-digit numeric OTP from recent unread emails in the INBOX of a Gmail account.
Configure Email with Gmail address and app password, Mail Server as imap.gmail.com, Code Type as number, Code Length as 6, default Folder as INBOX, Unread Only true, and Max Mails to scan.