In this example, two Workflows are set up for Document Parser to do the following:
- One Workflow extracts all the text from any attachments and adds this as an Internal Note.
- Another Workflow extracts information about an Invoice and adds this as Custom Field.
- Both Workflows are set up to fire when a new ticket is either created or updated
For general information on setting up Workflows, refer to Configuring the Workflows for Document Parser.
In this Article
Creating the Workflow
Name and Trigger
Read Documents and Images from the following Fields
Parse Documents and Images with these File Extensions
Parsing Rules
Save the Workflow
Opening and Editing the Trigger Created for Document Parser in your Zendesk Admin Center
Enable the Workflow and Save
Create another Workflow to Extract Invoice Information
How the Workflows Extract the Information from an Attachment
Creating the Workflow
The following is a summary of how to set up the Workflow for this example.
Name and Trigger
| Name | Enter the Name, for example, Extract All Text. |
| Trigger |
This selects the Zendesk Trigger to use, and whether this is when the ticket is Created or Updated. You can select When a ticket is created (new Trigger) to create a new Trigger. You can also select an existing Trigger that has already been created for a Document Parser Workflow. For details on this, refer to Trigger in Configuring the Workflows for Document Parser. This example also covers how to change the Trigger in your Zendesk Admin Center. |
Read Documents and Images from the following Fields
Select the fields in the ticket where you want Document Parser to read the documents and images from. This can be selected as one or more of Last Customer Comment, Last Agent Reply, Last Reply from any user or Last Internal Note.
For this example, select Last Customer Comment.
Parse Documents and Images with these File Extensions
For this example, we will select all file extensions.
Parsing Rules
| Add a New Parsing Rule | Click New. |
| Description | You can leave one of the Parsing Rules with the description empty. This will extract all the text in the documents or images. You can only have one Parsing Rule with the description empty in a Workflow. |
| Name | This automatically names the Parsing Rule as Extract all text. |
| Where to put the value extracted | Add an internal note |
Save the Workflow
Save it by clicking Save.
The Configuration displays and includes the saved Workflow.
Before enabling the Workflow, for this example, we will make some changes to the trigger that was created for this Workflow.
Opening and Editing the Trigger Created for Document Parser in your Zendesk Admin Center
We will change the trigger that was created for this Workflow so that:
The trigger is activated either when a ticket is Created OR Updated.
The trigger is activated only when the ticket includes at least one attachment.
- Open the Workflow and edit it by clicking the Name in the Configuration, or click the vertical ellipsis and select Edit.
When editing the Workflow, this shows the Trigger, for this example, Swifteq New Ticket - Extract All Text.
- Click View Trigger to open it in your Zendesk Admin Center.
- Make the following changes
- In the Meet ANY of the following conditions section remove the initial condition
Ticket > Ticket is Created
- In the Meet ANY of the following conditions section add two conditions for
Ticket > Ticket is Created
Ticket > Ticket is Updated
- In the Meet ANY of the following conditions section add a condition for
Ticket > Attachment is Present
Enable the Workflow and Save
Once the changes to the Trigger have been made, open the Workflow again and enable it by clicking the Enable/Disable toggle.
Save it by clicking Save.
Create another Workflow to Extract Invoice Information
In this Workflow, parts of the attachment are extracted in order to update relevant Custom Fields.
When updating Custom fields, ensure that the Custom Field has been set up in Zendesk to accept the output that will be updated. For example, if the value from ChatGPT is alphanumeric, ensure the Custom Field will accept an alphanumeric value and not just a numeric value.
| Name | Enter the Name, for example, Extract Invoice Information. |
| Trigger |
You can select the Zendesk Trigger created for the previous Workflow. This Trigger is already set up for when a ticket is either created or updated and to be activated only when the ticket includes at least one attachment. Select Swifteq New Ticket - Extract All Text. |
| Read Documents and Images from the following Fields | For this example, select Last Customer Comment. |
| Parse Documents and Images with these File Extensions | For this example, select all file extensions. |
| Add a New Parsing Rule | Click New. |
| Description | Extract the invoice number from the attachment. The invoice number is at the top of the invoice under the customer address and under the order number and above the table with the invoice details. The invoice number starts with FO followed by 5 numbers, for example FO 12345. Extract the invoice number only from the first page of the invoice. Extract only the Invoice number without any additional text. |
| Name | The Name of the Parsing Rule is automatically added as Extract the invoice number from the attachment. Th... |
| Where to put the value extracted | Select Update a Custom Field Select Invoice Number |
| Add another Parsing Rule | Click New. |
| Description |
Extract the invoice date from the attachment. The invoice date is at the top of the invoice under the Invoice Number and above the table with the invoice details. The invoice number is in the format Mmmm dd, YYYY, for example February 01, 2026. Extract only the Invoice date without any additional text. Note that when extracting a value that will be added to a Date Custom Field this type of Custom Field accepts values in the format Mmmm dd, YYYY, for example February 01, 2026. When you add the description, you can specify the format of the value to extract and add instructions to change this to the format needed for the Custom Field. For example, |
| Name | The Name of the Parsing Rule is automatically added as Extract the invoice date from the attachment. The ... |
| Where to put the value extracted | Select Update a Custom Field Select Invoice Date |
| Enable the Workflow and Save | Click the Enable/Disable toggle and save by clicking Save. |
How the Workflows Extract the Information from an Attachment
The following is an example of how these two Workflows extract the text and add it as an Internal Note and update the Custom Fields.
This is an example of the email that is sent by the customer.
The email arrives and creates a ticket.
The Workflows trigger and, based on the text in the attachment, the following are actioned:
When the Workflow Extract All Text triggers:
- The text in the attachment is extracted and added as an Internal Note.
When the Workflow Extract Invoice Information triggers:
- The invoice number in the attachment is extracted and updated to the Custom Field Invoice Number.
- The invoice date in the attachment is extracted and updated to the Custom Field Invoice Date.