Email-to-Ticket Automation
The workflow builder lets you automatically convert incoming emails into help desk tickets. When an email arrives in a connected mailbox, a workflow can evaluate conditions and create a ticket with the correct fields pre-populated.
Prerequisites
- A mailbox must be connected and syncing in the Email module.
- You need the workflow.create permission to build workflows.
Step 1: Create the Workflow
- Navigate to the Workflow Builder in the top nav bar under account settings.
- Click Add.
- Enter a name (e.g., “Support Email to Ticket”) and an optional description.
Step 2: Configure the Trigger
- Set the Trigger Entity to Email.
- Set the Trigger Event to Created. This fires whenever a new email is synced from your mailbox.
Step 3: Add Trigger Conditions (Optional)
Conditions let you filter which emails trigger the workflow. For example, you might only create tickets for emails sent to a specific address or containing certain keywords.
Each condition specifies a field, an operator, and a value:
- Fields: subject, from_address, to_address, body_text
- Operators: contains, not_contains, equals, not_equals, starts_with, ends_with, regex_match, is_empty, is_not_empty
Example: To only process emails sent to support@yourcompany.com, add a condition where to_address contains support@yourcompany.com.
Step 4: Add the Create Help Desk Ticket Action
- In the Actions section, click Add Action.
- Select Create Help Desk Ticket as the action type.
- Configure the action fields:
- Priority: Select a default priority (Urgent, High, Medium, or Low).
- Category: Select a default category (General, Billing, Technical, Account, Feature Request, Bug Report, or Other).
- Channel: Defaults to Email. You can change this if needed.
- Agent: Optionally assign a specific agent. If left blank, auto-assignment rules will apply.
Step 5: Configure Field Mappings
Field mappings control how email data flows into the ticket. Use placeholder syntax to reference trigger entity fields:
- Subject:
{{trigger.subject}}maps the email subject to the ticket subject. - Description:
{{trigger.body}}maps the email body (HTML preferred, plain text fallback) to the ticket description. - Sender Email:
{{trigger.from_address}}maps the sender address. The system matches this to an existing Contact or creates a new one automatically.
Step 6: Enable and Save
- Toggle the workflow to Enabled.
- Click Save.
What Happens When the Workflow Runs
- A new email arrives and is synced from the mailbox.
- The workflow evaluates the trigger conditions. If all conditions pass (or no conditions are set), it proceeds.
- A ticket is created with the mapped fields. The ticket observer generates a unique reference number and access token.
- If no agent was specified, auto-assignment rules are evaluated to route the ticket.
- If a default SLA policy exists, response and resolution due timestamps are calculated.
- An audit log entry records the ticket creation with the source marked as “workflow_email”.
Monitoring Workflow Executions
Each workflow run creates an execution record. Navigate to the workflow detail page to view execution history, including status (completed, failed), timestamps, and the trigger entity that initiated the run.