This scenario helps you create a log of all email messages and tag them for further action in a spreadsheet. It captures an email body in two separate tables in a spreadsheet using Regular Expressions (Regex) as search patterns. The first pattern searches for a phrase and the second searches for the same phrase and an email address.
You must have the following access to use the functionality in this article:
|Adobe Workfront plan*||
Pro or higher
|Adobe Workfront license*||
|Adobe Workfront Fusion license**||
Workfront Fusion for Work Automation and Integration
|Product||Your organization must purchase Adobe Workfront Fusion as well as Adobe Workfront to use functionality described in this article.|
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information on Adobe Workfront Fusion licenses, see Adobe Workfront Fusion licenses.
This tutorial requires basic knowledge of regular expressions. To learn about Regex, visit https://regexone.com.
Add the first module and configure it
Search for Email and choose Watch emails as the Trigger.
While you can connect a Google account using the Email module, you can also use a Gmail module.
Connect either a Google account or any other IMAP based email client (such as Outlook).
Once connected, select a Folder whose incoming emails you want to watch, such as Inbox.
Under Criteria, choose All email (or narrow it down to read or unread emails).
You can also choose to mark fetched emails as read or unread.
Set the Maximum number of results to 1.
You can change this based on the volume of messages you receive. However, it’s recommended to set a low value and run the scenario more often.
Click Show advanced settings at the bottom.
Filter emails by the Sender address, Subject and Phrase.
This gives you the ability to watch only relevant emails. In this example, we have added only a Subject filter and left the other 2 blank.
We will add a router to look for phrases in an email using the Match Pattern iterator and a Regular Expression (Regex) as a search pattern. This also enables us to build a multi-utility scenario.
Once the configuration is done, and you are prompted to specify where to start watching your emails, click From now on.
Continue to Search for Flow Control and add a Router
Add a router after any module to split or duplicate the data before sending it to the next module.
Here, we have used a Router to send the Email body text to 2 separate tables in a Google Sheet.
Add a Match Pattern transformer to search for a phrase in an email.
We will search for the phrase “text parser module” in all incoming emails to capture the body text and sender’s name of the ones that match that phrase.
Write the Pattern as a Regular Expression:
(Optional) Use any of the other Pattern options.
Multiline is useful if your text contains several lines and you need to search for the pattern in each line. For this tutorial we need to search for the pattern in the entire email body text, hence we will leave it unchecked.
In the Text field, click the attribute Text content in the list.
This is the attribute that stores the text from the email body in which we will search for the pattern.
Add another Match Pattern that searches for the same phrase and an email address.
This is particularly useful if you have customer accounts with multiple users. To save time, you can clone the Text Parser module you just created and link it to the Router.
Edit the pattern as follows:
This pattern searches for the phrase “text parser module” and an email address like firstname.lastname@example.org and returns only the email address.
It’s important to write your regex in accordance with the specification of the email addresses you accept, but the one above takes care of most standard email addresses.
If you’d like to search only for email address, you can use the regex below:
You may also search only for phone numbers using the regex below:
The above pattern covers most common formats in which a phone number is written.
The rest of the configuration remains the same as the one before.
For Sheets, we need to first create a spreadsheet with the requisite headers.
Create a spreadsheet with the columns under which you’d like to capture the user data. (Feel free to use an existing file too).
For example, create one called “Email Data: Support Ticket” with Sender Name, Sender Email and Email Content as columns. Name the worksheet “contains: text parser module.”
Add the Google Sheets module with Add a row as the action.
Connect your Google account (if you haven’t already). Choose the File you created earlier, followed by choosing the Worksheet in which you’re capturing the data.
Your setup should look like this:
Map the attributes in the relevant fields (columns) to finish the module setup.
Clone the module you just created and link it to the second Text Parser module.
Go to your Spreadsheet, duplicate the worksheet you created earlier and give it a name.
For example, name it “contains: text parser module and email.”
Add another column to store the email address that the email body contains.
For example, name it “Email Address Shared.”
Click the cloned Google Sheets module to configure the setup.
Change the worksheet to the new one you just created.
Map the output from the Match Pattern module ($1) to the column where you want to store the email address (Email Address Shared).
Click OK, save the scenario, and take it for a test run.
You will need to send two separate emails to the connected email address as follows:
Containing the phrase “text parser module” (and no email address)
Containing the above phrase and an email address
If there are no errors in your setup, you will see that the first worksheet captures all emails containing the phrase “text parser module” while the second worksheet captures only those that contain the phrase “text parser module” and an email address. You may refer to the screenshots below.