Email Trigger (SMTP)
The Email trigger sends a notification email after your automation completes. This is one of the most popular triggers because it gives you instant feedback: the moment your scraping run finishes, you get an email telling you the results, alerting you to errors, or delivering a summary of what was extracted.
Think of it as a “mission report” delivered straight to your inbox. You don’t need to check RTILA X manually — the email comes to you.

When to Use the Email Trigger
Section titled “When to Use the Email Trigger”| Use Case | Example |
|---|---|
| Run completion alerts | Get an email when your daily scraper finishes |
| Error notifications | Get alerted immediately when a run fails |
| Data summaries | Receive a summary of how many records were extracted |
| Scheduled reports | Combine with the Task Scheduler for daily/weekly email reports |
| Client notifications | Notify clients when their data delivery is complete |
| Multi-step pipeline alerts | Alert different team members at different stages |
How the Email Trigger Works
Section titled “How the Email Trigger Works”When your automation completes (or fails), RTILA X:
- Reads the email trigger configuration.
- Connects to your SMTP server using the credentials you provided.
- Composes an email with your subject, body, and optional attachment.
- Sends the email to the specified recipient.
- Logs the result (success or failure) in the execution logs.
The email is sent after the project run completes, not during it. This means the email body can reference variables that were set during the run, such as the number of records extracted or the final page URL.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
smtp_server |
string | ✅ Yes | — | The address of your SMTP (email sending) server. This is provided by your email provider. Example: smtp.gmail.com |
smtp_port |
integer | ✅ Yes | 587 | The port number your SMTP server listens on. Most providers use 587 (with TLS) or 465 (with SSL). |
use_tls |
boolean | ✅ Yes | true | Whether to encrypt the connection using TLS. Always enable this for security. |
username |
string | ✅ Yes | — | Your email account username. For most providers, this is your full email address. |
password |
string | ✅ Yes | — | Your email account password or app-specific password. Never use your main password — use an app password instead. |
sender_email |
string | ✅ Yes | — | The email address that appears in the “From” field. Must be an address you own. |
recipient_email |
string | ✅ Yes | — | The email address that will receive the notification. |
subject |
string | ✅ Yes | — | The subject line of the email. Supports ${variable} substitution. |
body |
string | ✅ Yes | — | The main text content of the email. Supports ${variable} substitution. |
attachment_path |
string | No | — | The file path of a file to attach to the email. Leave empty for no attachment. |
Common SMTP Servers
Section titled “Common SMTP Servers”Here are the SMTP settings for the most popular email providers:
| Provider | SMTP Server | Port | TLS | Notes |
|---|---|---|---|---|
| Gmail | smtp.gmail.com | 587 | Yes | Requires an App Password (not your regular password). Enable 2FA first. |
| Outlook / Hotmail | smtp.office365.com | 587 | Yes | Use your Microsoft account password. |
| Yahoo Mail | smtp.mail.yahoo.com | 587 | Yes | Requires an app password if 2FA is enabled. |
| iCloud Mail | smtp.mail.me.com | 587 | Yes | Use an app-specific password from Apple ID settings. |
| Zoho Mail | smtp.zoho.com | 587 | Yes | Requires an app-specific password. |
| ProtonMail | 127.0.0.1 | 1025 | Yes | Requires ProtonMail Bridge running locally. |
| FastMail | smtp.fastmail.com | 587 | Yes | Use an app password from FastMail settings. |
| Mailgun | smtp.mailgun.org | 587 | Yes | Use your Mailgun SMTP credentials from the dashboard. |
| SendGrid | smtp.sendgrid.net | 587 | Yes | Use apikey as username and your SendGrid API key as password. |
| Amazon SES | email-smtp.us-east-1.amazonaws.com | 587 | Yes | Use your SES SMTP credentials. Replace region as needed. |
| Custom / Self-hosted | Your server address | Varies | Varies | Contact your IT department for settings. |
Tip: If your email provider is not listed, search for “[Provider Name] SMTP settings” to find the correct server address and port.
Example Configuration
Section titled “Example Configuration”Example 1: Gmail Notification
Section titled “Example 1: Gmail Notification”This example sends a completion notification via Gmail:
{ "smtp_server": "smtp.gmail.com", "smtp_port": 587, "use_tls": true, "username": "your-email@gmail.com", "password": "abcd efgh ijkl mnop", "sender_email": "your-email@gmail.com", "recipient_email": "team@company.com", "subject": "Scrape Complete: ${project_name}", "body": "Your automation has finished.\n\nRecords extracted: ${record_count}\nTarget URL: ${target_url}\nCompleted at: ${completion_time}", "attachment_path": ""}Important: For Gmail, you must use an App Password, not your regular Gmail password. To create one:
- Go to your Google Account settings.
- Enable 2-Step Verification if not already enabled.
- Go to Security → App Passwords.
- Generate a new app password for “Mail”.
- Use the 16-character password (spaces included) in the password field.
Example 2: Error Alert with Attachment
Section titled “Example 2: Error Alert with Attachment”This example sends an error report with the execution log attached:
{ "smtp_server": "smtp.office365.com", "smtp_port": 587, "use_tls": true, "username": "alerts@company.com", "password": "your-app-password", "sender_email": "alerts@company.com", "recipient_email": "devops@company.com", "subject": "⚠️ AUTOMATION FAILED: ${project_name}", "body": "The automation '${project_name}' failed.\n\nError: ${last_error}\nURL: ${target_url}\nTime: ${completion_time}\n\nPlease check the attached log file for details.", "attachment_path": "logs/execution_log.txt"}Example 3: SendGrid for High-Volume Notifications
Section titled “Example 3: SendGrid for High-Volume Notifications”{ "smtp_server": "smtp.sendgrid.net", "smtp_port": 587, "use_tls": true, "username": "apikey", "password": "SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "sender_email": "noreply@company.com", "recipient_email": "data-team@company.com", "subject": "Daily Scrape Report - ${date}", "body": "Daily scrape completed.\n\nTotal records: ${record_count}\nNew records: ${new_records}\nDuplicates skipped: ${duplicates_skipped}", "attachment_path": "output/daily_report.csv"}Variable Substitution in Emails
Section titled “Variable Substitution in Emails”You can use ${variable_name} in both the subject and body fields. Common variables you might use:
| Variable | Description | Example Value |
|---|---|---|
${project_name} |
The name of the project that ran | “Amazon Product Scraper” |
${record_count} |
Number of records extracted | “247” |
${target_url} |
The URL that was scraped | “https://example.com/products” |
${completion_time} |
When the run finished | “2025-01-15 14:32:00” |
${last_error} |
Error message (if the run failed) | “Element not found: css=.price” |
${date} |
Current date | “2025-01-15” |
${session_id} |
The session ID for this run | “abc123def456” |
Tip: You can also use any runtime variable you created with
set_variableduring your automation. For example, if you stored a product count withset_variable, you can reference it as${my_count}in the email body.
Attachments
Section titled “Attachments”The attachment_path parameter lets you attach a file to the email. This is useful for sending exported data files, logs, or reports.
| Scenario | attachment_path Value |
|---|---|
| Attach an exported CSV | "output/products_export.csv" |
| Attach an execution log | "logs/execution_log.txt" |
| Attach a PDF report | "reports/monthly_report.pdf" |
| Attach a screenshot | "screenshots/final_page.png" |
| No attachment | "" (leave empty) |
Note: The file path is relative to RTILA X’s output directory. The file must exist at the time the email is sent. If the file doesn’t exist, the email will still be sent but without the attachment, and a warning will appear in the logs.
TLS and Security
Section titled “TLS and Security”| Setting | Recommendation | Why |
|---|---|---|
use_tls: true |
Always enable | Encrypts your email credentials during transmission. Without TLS, your password is sent in plain text. |
| App passwords | Always use | Never use your main email password. App passwords can be revoked without changing your main password. |
| Port 587 | Recommended | This is the standard port for TLS-encrypted SMTP. |
| Port 465 | Alternative | Some providers use this for SSL. Check your provider’s documentation. |
| Port 25 | Avoid | This is the unencrypted SMTP port. Most providers block it. |
Troubleshooting
Section titled “Troubleshooting”| Problem | Cause | Solution |
|---|---|---|
| “Authentication failed” | Wrong username or password | Double-check your credentials. Use an app password, not your main password. |
| “Connection timed out” | Wrong SMTP server or port | Verify the server address and port with your email provider. |
| “TLS handshake failed” | TLS is disabled or port is wrong | Enable use_tls and use port 587. |
| “Sender address rejected” | Sender email doesn’t match username | Make sure sender_email matches the email account you’re sending from. |
| Email goes to spam | Recipient’s spam filter | Add the sender address to the recipient’s contacts. |
| Attachment not included | File doesn’t exist | Check that the file path is correct and the file was created before the email trigger runs. |
| Gmail rejects login | Using regular password | Gmail requires an App Password. Enable 2FA and generate one. |
| Rate limited | Sending too many emails | Most providers limit emails per day. Spread notifications across time. |
Tips and Best Practices
Section titled “Tips and Best Practices”| Tip | Why It Matters |
|---|---|
| Use app passwords, never main passwords | App passwords can be revoked without changing your main password. |
| Always enable TLS | Protects your credentials from interception. |
| Keep email bodies concise | Long emails are harder to read. Include only key information. |
| Use variables in subjects | Makes it easy to identify which run the email is about. |
| Test with a personal email first | Verify the configuration works before sending to team addresses. |
| Use a dedicated sending address | Don’t send from your personal inbox. Use something like alerts@company.com. |
| Check spam folders | New sender addresses often land in spam initially. |
| Use SendGrid or Mailgun for high volume | These services are designed for automated email and have better deliverability. |
| Set up different triggers for success and failure | Use separate triggers so you get different notifications for success vs. failure. |
| Don’t attach very large files | Files over 25 MB may be rejected by most email providers. |