Workflow: How to view original recipients from an inbound email with Action Builder

Your Zendesk account likely has many email addresses for different brands or aliases. You may want the complete list of addresses the end user adds in the TO or CC fields. When someone emails several of your Zendesk Support addresses, one address is selected as the support address for the ticket.

This workflow shows how to get the full list of recipients with a custom action and use it in an action flow.

Step 1: Create the custom action

Step 2: Add it to an action flow

Step 3: Use the custom action's outputs as needed

Step 1: Create the custom action

Follow the custom action documentation to create a custom action and set up authentication:

To create this custom action:

Add an input of type text for the Ticket ID parameter

In the API configuration, enter the details for a GET call to the Tickets Audits endpoint. This request doesn't require a body value.

The configuration so far looks like this:

To add an output, click + Add output and enter a ticket ID from your account

Search the results for original_recipients

After you click Add, complete the steps. This adds an output of type text array.

(Optional) You can also add other items of interest, like the from address, to get more outputs:

Click Save.

Step 2: Create the action flow and add the custom action

Next, create the action flow to perform the preferred action under certain conditions:

Add an action flow trigger. This is the condition or event that causes the action flow to run. For example, when a ticket is created and the via channel is email

In the visual workflow builder, beneath an existing step, click the Add step icon ( ).

In the step sidebar, under Custom actions, select one of the actions you've created.

Add additional steps as needed to use the custom action's outputs. See Use the custom action's outputs.

Click Save.

When you're ready to use the action flow, click Activate.

Step 3: Use the custom action's outputs as needed

The custom action returns the outputs you configured. You can use them as variables in other action flow steps.

For example, one simple option is to add an internal note to a ticket with the original recipients list and the end-user address.

Add a step to Update ticket and set Ticket ID as the variable

From Additional fields, add:

Comment is public > False

Comment

You have many ways to use this data. For example, add a Google step in the flow to send an email, add rows to Google Sheets or Drive, or run custom code.