Zenphi Mail

Definition


The Zenphi Mail trigger is a specialized email arrival trigger designed to start a flow automatically when an email is sent to a unique Zenphi-provided address. Unlike typical email arrival triggers, this feature offers a dedicated inbox address (e.g., [alias].[workspace]@us1.zenphiinbox.com) tailored for your workspace, allowing for professional-grade automation and fine-grained data handling.

This trigger is ideal when you want to initiate workflows via email — for example, by sending form data, scanned documents, or structured messages to a Zenphi inbox. What sets this apart is its rich set of outputs, enabling advanced use cases such as spam filtering, sender authentication checks (via SPF and DKIM), access to raw headers, character sets, and envelope-level information — details that go beyond the basic capabilities of standard Gmail or Outlook triggers.

Further in this documentation, we’ll explore how to configure this trigger, interpret its outputs, and implement use cases that take advantage of its full customizability and enterprise-ready design.



Example Use Cases


1. Invoice Processing via Email

Automatically extract and process invoice attachments sent to a dedicated Zenphi Mail address. Parse data, upload to a database, and notify the finance team.


2. Contract Review Workflow

Trigger a legal review flow when a signed contract PDF is emailed in. Attachments are extracted, metadata parsed, and reviewers assigned.


3. Spam Filtering for Sensitive Flows (Conditional Run)

Run the flow only if the spam score is below a threshold (e.g., less than 5) to ensure only clean, legitimate emails are processed, avoiding risk or automation waste.


4. Department-Specific Intake

Use aliases like hr.myworkspace@... or sales.myworkspace@... to route different types of incoming emails to department-specific workflows.


5. Custom Email Parser for CRM Integration

Trigger a flow when structured emails (e.g., from web forms or leads) arrive. Extract name, email, message from the plain text or HTML, and push to your CRM.


6. Email Authenticity Check (Conditional Run)

Trigger flows only if SPF and DKIM both pass, ensuring that the sender is authentic before proceeding with automated actions like updating records or storing data.


7. Secure Document Submission Portal

Set up a secure inbox for partners to submit documents. Extract attachments, verify sender IP and DKIM status, and archive the files securely in Drive or SharePoint.


8. Approval via Email

Let team members respond to tasks or forms via email. The incoming email triggers the flow, parses the response, and updates approval status accordingly.



Configuration


Settings:

1. Alias

**What it is:**The Alias is the customizable part of the email address that Zenphi provides to trigger your flow. When an email is sent to this address, the flow will automatically start.

**How it works:**Zenphi assigns a dedicated domain for your workspace's email-based flows. The full address structure is:

[alias].[your-workspace-name]@us1.zenphiinbox.com

You only need to define the alias part. For example, if you enter salesleads and your workspace is mycompany, the trigger email will be:

[email protected]

**Why it matters:**This lets you easily organize and manage flows by category (e.g., invoices, feedback, support) and route incoming emails accordingly.

Example Use:


Conditional Run:

The Conditional Run feature enables you to define specific criteria that must be met for your Zenphi Mail trigger to start the flow. If an email arrives but does not meet these conditions, the flow will be skipped — saving resources and ensuring your automation runs only when relevant.

This is especially useful for the Zenphi Mail trigger, where emails can vary greatly in content, sender, recipients, or metadata. For example, you may want to run your flow only when an email:

  • Is sent from a particular domain or sender address
  • Contains specific keywords in the subject or body
  • Has a spam score below a threshold
  • Was sent to a particular alias or envelope recipient
  • Passes DKIM/SPF authentication checks

🔁 How Conditional Run Works with Zenphi Mail

When enabled, Conditional Run lets you build one or more rules using AND/OR logic. Each rule consists of:

  1. Condition Type

    • When: Run the flow only if the condition is true
    • Except When: Skip the flow if the condition is true
  2. Value to EvaluateChoose from the rich set of Zenphi Mail trigger outputs, such as:

    • Sender, Recipients, Subject — filter by who sent the email or what it contains
    • Spam Score, Spam Report — filter based on spam detection
    • DKIM, SPF Status — run flows only for authenticated emails
    • Envelope From/To/Recipients — route flows by SMTP-level addresses
    • Headers — use advanced filtering based on raw email metadata
    • Mailbox Hash — customize flows based on tagged mailbox aliases

    Or use values from Vaults for secure, static references (API keys, tokens, etc.).

  3. OperatorChoose how to compare the value, such as:

    • Equals / Not Equals
    • Greater Than / Less Than
    • Is Null / Is Not Null
    • Between (for numeric ranges)
  4. Comparison ValueCompare against a fixed value, another trigger output, or a Vault entry.


🔐 Vaults Reminder

Vaults store your sensitive data securely (like API keys or passwords). These values:

  • Are managed in your workspace under Settings → Vaults
  • Are never visible or editable within flows for security
  • Can be referenced safely in Conditional Run rules to protect secrets

🧠 Example Conditions for Zenphi Mail

  • Run the flow only if the sender email ends with @trustedclient.com
  • Skip the flow except when the spam score is less than 5
  • Run the flow only when the email subject contains “Invoice”
  • Run the flow when the DKIM status equals pass (to ensure legitimacy)
  • Skip the flow if the envelope recipient is not your specific alias
  • Run the flow when the mailbox hash equals a particular client tag stored securely in a Vault

Why Use Conditional Run with Zenphi Mail?

This powerful filtering ensures your flows activate only on relevant emails, improving efficiency and reducing noise. Whether filtering by sender, content, or security checks, Conditional Run lets you tailor your automation precisely to your business needs.



Outputs


When an email arrives at your Zenphi Mail trigger address, the system extracts detailed information from that email. These outputs are accessible throughout your flow using the token picker, and you can also use them in the Conditional Run section to create dynamic conditions.

Part 1: Typical / Basic Outputs

These outputs cover the essential data fields you’d expect from any email trigger, useful for general processing and automation:


1. Message ID

A unique identifier for the email message, which helps you track and reference this specific email throughout your workflow.


2. Date

The exact date and time when the email was sent, allowing you to sort, filter, or timestamp your processes based on email timing.


3. Sender

Contains the email address and name of the person who sent the email, useful for addressing replies or filtering by sender.


4. Recipients

A list of all the primary recipients (To:) of the email, including their email addresses and names.


5. CC Recipients

A list of all the email addresses and names that were included in the CC (carbon copy) field of the email.


6. Subject

The subject line of the email, providing a brief summary or topic, ideal for routing or categorizing emails automatically.


7. Text Content

The plain text body of the email, which is useful for extracting readable content without formatting.


8. HTML Content

The full HTML version of the email body, preserving formatting, images, and styles—perfect if you need to process or display the email exactly as it was received.


9. Attachments

A list of attachments included in the email, with detailed data such as:

  • File name
  • MIME type (file format)
  • File size
  • File content payload (the actual binary data of the file)

This lets you save, process, or forward attached files as part of your automation.


These outputs form the backbone of any email-triggered flow and are typical for most email automation tools. The Zenphi Mail trigger, however, also offers advanced outputs for professional and customizable use cases (covered in the next section).



Part 2: Advanced Outputs

Note: These outputs might not be useful for everyone. The main power of the Zenphi Mail trigger is providing a unique, dedicated email address for your flows — perfect for passing data and triggering workflows without cluttering your personal or work inboxes. While many users rely on typical email fields, this trigger also delivers advanced data fields below to make your automations smarter and more secure. Use these outputs to add extra layers of validation, filtering, and data extraction to your flows.

1. Headers


✅ What is it?

The raw email headers contain all metadata about the email’s journey, authentication, and formatting, including:

  • Mail server hops (Received: lines) showing the route the email took
  • Authentication results (DKIM, SPF, DMARC)
  • Content types and encodings
  • Threading information and message IDs
  • Custom or automated headers (e.g., X-Auto-Response-Suppress)

🛠 How to use it in Zenphi

Headers are text-heavy and technical but you can:

  • Use string search or regex in conditions to detect specific markers (e.g., auto-replies or forwarding)
  • Extract custom headers your system or third-party apps add
  • Debug email delivery or spoofing issues by inspecting hops and authentication data

📌 Use Case Examples

  • Automatically detect and skip auto-responses:If headers contains "X-Auto-Response-Suppress" → mark as auto-reply and skip processing.

  • Extract timezone or mail server delay from Received: lines to audit mail flow.


2. DKIM and SPF Status


✅ What are they?

These fields tell you whether the email passed key authentication checks:

FieldMeaningCommon Values
dkimVerifies if email content was signed and untamperedpass, fail, none
spfStatusChecks if sending server IP is authorized by domainpass, fail, neutral

🛠 How to use it in Zenphi

  • Filter or block emails failing these checks to reduce phishing/spoofing risks
  • Alert security teams on suspicious messages
  • Allow only emails with valid DKIM/SPF for sensitive workflows

📌 Use Case Examples

  • If dkim != "pass" OR spfStatus != "pass" → route email to quarantine or notify security.
  • Only process support tickets if dkim is pass to ensure sender legitimacy.

3. Envelope From, Envelope To, Envelope Recipients


✅ What are they?

These are the SMTP-level sender and recipient addresses used during mail transmission — they can differ from the visible From or To headers.

FieldDescription
envelopeFromThe actual sender address in SMTP
envelopeToThe SMTP-level recipient address
envelopeRecipientsList of all final delivery addresses

🛠 How to use it in Zenphi

  • Verify true sender beyond “From” header for spoofing detection
  • Route emails based on exact alias they were sent to (useful if you have multiple aliases or sub-addressing)
  • Track or log all recipients for compliance or auditing

📌 Use Case Examples

  • Compare envelopeFrom to visible from.email to detect fake senders.
  • Use envelopeTo to determine which team alias received the email and route accordingly (e.g., sales@ vs support@).

4. Charsets


Character encodings used for various parts of the email (subject, text, HTML, from, to). For example:

"charsets": { "to": "UTF-8", "from": "UTF-8", "subject": "UTF-8", "text": "iso-8859-1", "html": "iso-8859-1" }

🛠 Why it matters

  • Incorrect encoding can cause garbled or unreadable text (e.g., accented characters showing incorrectly)
  • Essential for correct parsing, especially for internationalized emails

📌 Use Case Examples

  • Detect and convert non-UTF-8 encodings before processing.
  • Send alerts or adjust workflows if incompatible charsets are detected.

5. Mailbox Hash


A unique hash or tag appended to the mailbox to help track or route messages without exposing personal info. Often uses “plus addressing” (e.g., [email protected]).

🛠 How to use it in Zenphi

  • Customize your Zenphi alias with tags for dynamic routing:

  • Use the mailbox hash in your flow to:

    • Identify which client or ticket the email relates to
    • Trigger client-specific automations without creating multiple mailboxes

📌 Use Case Examples

  • Automatically assign incoming support emails to the right client based on the mailbox hash.
  • Route marketing replies tagged with campaign IDs for analytics.

6. Sender IP


The IP address of the machine that sent the email.

🛠 How to use it in Zenphi

  • Geo-locate IP to verify origin or detect anomalies
  • Apply filters based on IP range (e.g., only accept internal corporate IPs)
  • Use as part of security logging

📌 Use Case Examples

  • Reject or flag emails from suspicious geographies or known malicious IPs.
  • Audit senders for compliance by tracking originating IPs.

7. Spam Report & Spam Score


Detailed report and numeric score indicating the likelihood the email is spam.

🛠 How to use it in Zenphi

  • Route emails with high spam scores to quarantine or manual review
  • Alert your security team for suspicious emails
  • Automate different processing based on spam risk level

📌 Use Case Examples

  • If spamScore > 5 → send email to “Needs Review” folder or team.
  • Log spam report details to monitor attack patterns.

⚠️ Important Final Note

Some of these fields may be null or missing depending on:

  • How the sender’s mail server formats or restricts data
  • Your email provider’s policies
  • Privacy or security measures

Always test your flows with real emails from your use cases to confirm the data you want is actually provided before relying on it.



Example


Suppose you want your flow to trigger only when an email comes from your company’s known mail server and the email passes DKIM verification to ensure it’s authentic.

Set these conditions in Conditional Run:

  • When Sender IP Equals: 203.0.113.25 (your company’s trusted mail server IP)
  • And DKIM Status Equals: pass

This ensures the flow runs only for emails sent from your secure server with verified authenticity, protecting your automation from spoofed or fraudulent emails.