Email Blocks
Email blocks let you test email-based API flows — like signup verification, OTP login, and password reset. TestBrick catches the email, extracts values from it, and passes them to the next block.
How it works
- Your API sends an email (e.g., OTP to verify a signup)
- The email block waits for the email to arrive in your TestBrick inbox
- You extract the OTP or verification link from the email
- The next block uses the extracted value to complete the flow
Setup
Your inbox address
Each project folder has a unique email inbox. Open the ⋯ menu on the canvas and click Copy inbox address (e.g., abc123@inbox.testbrick.com).
Use this email address in your API requests:
Adding an email block
Click Add block → Email to add an email block.
Configuration
Click the email block to open the side panel with three tabs:
Settings
After running the flow, the email HTML appears in the Extract tab:
- Click Extract Value
- Hover over elements in the email preview — they highlight
- Click the OTP code or verification link
- Choose the extraction pattern (6-digit code, alphanumeric, custom regex)
- Click Save Extraction
The extracted value becomes available as {{nodeId.value}} in subsequent blocks.
Assert
Toggle Assert email content to validate:
Example: OTP login flow
The click-to-extract feature uses the same precise CSS path extraction as UI test email testing — it works reliably across different email templates.