Get Email Msg

Use this step to retireve an email message.

Last published at: March 30th, 2026

getEmailMsg Step

Description:

The GetEmailMsg workflow step retrieves information associated with an email message identified by a message ID. The retrieved email information is stored in the specified Variables or Global variables so that it can be used by subsequent workflow activities.

The step supports:

  • Providing an email message ID.
  • Retrieving the From email address.
  • Retrieving the To email address.
  • Retrieving the email subject.
  • Retrieving the email body.
  • Retrieving the file-list information associated with the message.
  • Storing each retrieved value in a Variable or Global variable.
  • Reusing the retrieved email information in subsequent workflow activities.
  • Returning a True or False result for subsequent workflow processing.

 

Inputs

  • msgIDVariable - The Variable/Global that holds the message ID property; specifies the Variable or Global variable containing the ID of the email message to retrieve.
  • varToStoreFromAddress – The Variable/Global to store the From email address property specifies the Variable or Global variable in which the email sender's address is stored.
  • varToStoreToAddress - The Variable/Global to store the to email address property specifies the Variable or Global variable in which the email recipient information is stored.
  • varToStoreSubject -  The Variable/Global to store the email subject property specifies the Variable or Global variable where the email subject is stored.
  • varToStoreBody - The Variable/Global to store the email body property specifies the Variable or Global variable where the email body is stored.
  • varToStoreFileList - The Variable/Global to store the file lists property specifies the Variable or Global variable where the file-list information associated with the email message is stored.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the email message information is retrieved successfully.
  • False – The False return path can be used for an alternative workflow path or error-handling logic when the email message information cannot be retrieved successfully.
 

 

Usage:

The GetEmailMsg step is typically placed after the workflow has obtained an email message ID and needs to retrieve the information associated with that message.

A typical workflow pattern is:

Get Message ID → Get Email Msg → Process Email

The retrieved information can then be used by later workflow steps to:

  • Identify the email sender.
  • Identify the email recipient.
  • Read the email subject.
  • Process the email body.
  • Process associated file-list information.
  • Classify or route email messages.
  • Generate notifications.
  • Store email information in workflow Variables.
  • Pass email information to downstream processing.
  • Build automated email-processing workflows.

 

This step pertains to email triggers.

To create and manage triggers, go to Process > Triggers > Email.

 

A sample Email Trigger configuration is provided here for reference.

 

Typical Workflow Suggestions:

Retrieve an Email Message

Use the step when the workflow has a message ID and needs to retrieve the corresponding email information.

Example:

Get Message ID → Get Email Msg → Process Email

Configure the message ID Variable and the Variables or Globals that will store the retrieved email information.

 

Process Incoming Email Information

Use GetEmailMsg as an initial processing step when an email message needs to be examined by a workflow.

Example:

Email Event → Get Email Msg → Analyze Email → Continue Process

The workflow can retrieve the sender, recipient, subject, body, and file-list information for subsequent processing.

 

Route Workflow Based on the Sender

Retrieve the From address and use it in a subsequent workflow decision.

Example:

Get Email Msg → Evaluate From Address → Route Workflow

For example, a workflow could retrieve the sender address and then use subsequent logic to determine which processing path to follow.

 

Process Email Subject

Use the retrieved email subject as an input to subsequent workflow activities.

Example:

Get Email Msg → Retrieve Subject → Classify/Route Email

The email subject can be stored in a dedicated Variable and passed to subsequent processing activities.

 

Process Email Body

Use the step to retrieve the email body and make it available for downstream processing.

Example:

Get Email Msg → Store Body → Text Processing

You can then use the email body for activities such as text processing, classification, extraction, or other workflow operations.

The XML explicitly provides a destination property for storing the email body.

 

Process Email Attachments

Use the Variable/Global to store the file list property when the workflow needs to work with file information associated with the email message.

Example:

Get Email Msg → Retrieve File List → Process Files

This makes the retrieved file-list information available to subsequent workflow activities.

 

Build an Automated Email-Processing Workflow

The step can serve as a central activity in workflows that process email information.

Example:

Get Message ID → Get Email Msg → Analyze Subject/Body → Process Request

You can store individual message properties separately, allowing different downstream activities to use the information they need.

 

Store Email Information for Reuse

Store each retrieved value in a dedicated Variable or Global variable when multiple subsequent workflow activities need the information.

Example:

Get Email Msg → Store Email Information → Multiple Subsequent Steps

The step provides separate storage properties for:

  • From address
  • To address
  • Subject
  • Body
  • File lists 

 

Generate Notifications from Retrieved Email Information

Use the retrieved email information as input to a notification workflow.

Example:

Get Email Msg → Process Email Information → Send Notification

For example, you can incorporate the retrieved subject or sender information into a workflow notification.

 

Pass Email Content to AI or Text Processing

The retrieved email body can be passed to a subsequent processing activity.

Example:

Get Email Msg → Store Email Body → AI/Text Processing

This can be useful when email content needs to be analyzed or classified as part of a workflow.

 

Use the True and False Paths

Use the two return paths to distinguish successful retrieval from an alternative processing condition.

Example:

                 ┌── True → Process Email
Start → Get Email Msg
                 └── False → Handle Retrieval Failure
The XML explicitly defines True and False return values for the step.

 

Example:

Let’s build and execute the “getEmailMsgDef” example.          

  • Create a new process definition named “getEmailMsgDef” and open it in designer mode. 
  • Drag an “getEmailMsg” step to the canvas. 
  • Connect the dots between the Start and “getEmailMsg” steps, as shown above. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
  • Define a variable or a global to store the result.
  • Click the "getEmailMsg" step to configure its "Required" properties. Provide a name for the step. Provide a variable or a global reference to store the email address, message body, and attachments. Then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. Render the process instance and click the Get Email Msg step to view its properties. When the workflow reaches the GetEmailMsg step, FlowWright uses the configured message ID to retrieve the email message information. The retrieved information is stored in the configured Variables or Global variables:
    • From email address
    • To email address
    • Email subject
    • Email body
    • File-list information
  • The workflow can then continue through the True path when the retrieval succeeds or use the False path for alternative or error-handling processing.

 

Tips:

  • Always provide a valid message ID before executing the step.
  • Use a meaningful Variable or Global variable for the message ID.
  • Use separate, clearly named Variables for the From address, To address, subject, body, and file-list information.
  • Verify that the destination Variables or Globals exist before executing the workflow.
  • Test the step with a representative email message.
  • Test messages containing different subjects and body content.
  • Test messages that contain associated files.
  • Also test messages where no file-list information is available.
  • Verify the stored values after the step executes.
  • Use the retrieved subject and body only after the Get Email Msg step has completed.
  • Connect the False return path to appropriate alternative or error-handling logic.
  • Use the True path to continue normal email processing.
  • Keep email-processing Variables clearly named so that they are easy to identify during workflow troubleshooting.
  • Test the workflow with realistic email content before deployment.
  • Avoid exposing complete email bodies or sensitive email information in workflow logs.
  • Consider the sensitivity of email content before passing retrieved values to external systems.
  • Verify that downstream activities expect the type and representation of information stored by this step.
  • Test the workflow after modifying downstream email-processing logic.
  • When processing file-list information, verify that the downstream activity can consume the returned value appropriately.
  • Do not assume additional email properties are returned by this step; the supplied XML explicitly exposes storage properties for From, To, Subject, Body, and file lists. 
  • Do not assume additional return values beyond True and False, which are the values defined in the XML.

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page, following the same approach described in the supplied SearchAndReplaceString documentation.

Note: Verify and complete any missing configuration after importing the sample, including:

  • Message ID Variable or Global variable.
  • Variable or Global variable for the From address.
  • Variable or Global variable for the To address.
  • Variable or Global variable for the email subject.
  • Variable or Global variable for the email body.
  • Variable or Global variable for the file-list information.
  • Workflow Variable references.
  • Environment-specific email configuration.
  • Downstream True and False workflow paths.
  • Any downstream email-processing configuration.

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.