Skip to main content

Email Blocks

Email blocks are a Pro feature. Free users can see the feature but need to upgrade to use it.
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

  1. Your API sends an email (e.g., OTP to verify a signup)
  2. The email block waits for the email to arrive in your TestBrick inbox
  3. You extract the OTP or verification link from the email
  4. The next block uses the extracted value to complete the flow

Setup

Your inbox address

Each project folder has a unique email inbox. Click the Inbox button in the toolbar to copy the address (e.g., abc123@inbox.testbrick.com). Use this email address in your API requests:

Adding an email block

Click Email in the toolbar to add an email block.

Configuration

Click the email block to open the side panel with three tabs:

Settings

Extract

After running the flow, the email HTML appears in the Extract tab:
  1. Click Extract Value
  2. Hover over elements in the email preview — they highlight
  3. Click the OTP code or verification link
  4. Choose the extraction pattern (6-digit code, alphanumeric, custom regex)
  5. Click Save Extraction
Click to extract OTP Extraction options modal 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.