Overview
TheEMAIL_CREATE_INBOX step creates or retrieves a test email inbox for receiving emails during test execution. This is the first step in any email testing workflow.
Parameters
Unique identifier for the inbox. Best practice is to include timestamps or random values to ensure uniqueness across test runs.Examples:
signup-testuser-{{TIMESTAMP}}order-{{RANDOM}}
Custom email address to use instead of the auto-generated format. If not provided, the system generates an address using the pattern:
{org_prefix}+{inbox_name}@withkeystonemail.comVariable name to store the generated email address. This variable can be used in subsequent steps.
Behavior
- Inbox Creation: Creates a new inbox or retrieves existing one
- Address Generation: Generates email address if not custom
- Organization Binding: Associates inbox with your organization
- Variable Storage: Stores email address in specified variable
- Idempotent Operation: Safe to re-run with same inbox name
Common Use Cases
- Creating unique test emails for user registration
- Setting up email addresses for password reset testing
- Generating customer emails for order confirmations
- Isolating email tests between test runs
Examples
Basic Inbox Creation
- Step type: EMAIL_CREATE_INBOX
- Inbox name: test-user
- Store as: USER_EMAIL
With Timestamp for Uniqueness
- Step type: EMAIL_CREATE_INBOX
- Inbox name: signup-
- Store as: TEST_EMAIL
Custom Email Address
- Step type: EMAIL_CREATE_INBOX
- Email: [email protected]
- Inbox name: custom-test
- Store as: CUSTOM_EMAIL
Multiple Inboxes in One Test
Admin inbox:- Step type: EMAIL_CREATE_INBOX
- Inbox name: admin-
- Store as: ADMIN_EMAIL
- Step type: EMAIL_CREATE_INBOX
- Inbox name: customer-
- Store as: CUSTOMER_EMAIL
Generated Email Format
When not using a custom email, addresses follow this pattern: +@withkeystonemail.com Example: [email protected] Where:acme123456is your organization’s unique prefixsignup-testis your specified inbox name@withkeystonemail.comis Keystone’s email domain
Best Practices
Always use unique inbox names for parallel test execution. Include timestamps or random values to prevent conflicts.
- Unique Names: Use
{{TIMESTAMP}}or{{RANDOM}}for uniqueness - Descriptive Names: Use names that indicate the test purpose
- Store Variables: Always store the email for use in later steps
- Clean Setup: Each test run gets a fresh inbox
Error Handling
The step will fail if:- Organization ID is not configured
- Variable name conflicts with existing variables
- Email service is temporarily unavailable
Ensure your test environment has
ORGANIZATION_ID or ORG_ID configured before using email testing features.Related Steps
- WAIT_FOR_EMAIL - Wait for emails to arrive
- EMAIL_EXTRACT - Extract data from emails
- Email Inbox Testing Overview - Complete email testing guide

