PMG’s incoming email actions
Wait for Email & Email Parser

As we all know, PMG’s workflow engine can compose and send emails, but did you know it can receive incoming emails, parse them, and automate your email driven business processes?

The Wait for Email action does just what it says. It waits for the specified email server to receive a new email based on criteria that you specify (e.g. the subject line starts with “Help!”). Then, your workflow handles the rest of the process.

It works like this: if a matching email is received, the Wait for Email action assigns the email an ID and follows the “Email Received” output path. The matching logic can be based on subject, sender, or recipient and configured accordingly.

From there, the Email Parser action takes over. It parses the From Address, From Name, Subject, Body, and Attachments and stores all that data in workflow variables for use throughout the workflow. You can route emails based on their contents, generate appropriate automated responses, or take whatever action your business process requires.

Here’s a quick example from a real email handling workflow:

1. The Wait for Email action waits until an email arrives on the email server. (This setup is configured in the Administration > Email page of the PMG Platform.) If an email arrives with the recipient address help@pmg.net, the Wait for Email action gives the email an ID and follows the “Email Received” output.

2. The Email Parser action saves all the specific component values of the email – subject, sender address, attachments, etc. – into workflow variables.

You can see the configuration of the Email Parser action here. The email subject is stored in a variable called @Subject.

3. The Decision step examines the workflow variable “@Subject”. If it contains the phrase “Case #”, it follows the “Yes” output and goes to the appropriate next step in the workflow.

If you need any help with processing incoming emails, just get in touch with your main PMG contact. As always, we’re here to help you deliver!