Email read email activity¶
Introduction¶
An Email Read Email activity, using its Email connection, retrieves unread email using the Internet Message Access Protocol (IMAP) and is intended to be used as a source to provide data to an operation.
Create an email read email activity¶
An instance of an Email Read Email activity is created from an Email connection using its Read Email activity type.
To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an activity instance in Component reuse.
An existing Email Read Email activity can be edited from these locations:
- The design canvas (see Component actions menu in Design canvas).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
Configure an email read email activity¶
Follow these steps to configure an Email Read Email activity:
-
Step 1: Enter a name and select a folder
Provide a name for the activity and select a folder. -
Step 2: Specify filters
Specify the email criteria to filter by. -
Step 3: Review the data schemas
Any request or response schemas generated from the endpoint are displayed.
Step 1: Enter a name and select a folder¶
In this step, provide a name for the activity and select a folder. Each user interface element of this step is described below.
-
Name: Enter a name to identify the activity. The name must be unique for each Email Read Email activity and must not contain forward slashes
/
or colons:
. -
Select a Folder: This section displays folders available in the Email endpoint.
-
Selected Folder: After a folder is selected, it is listed here.
-
Search: Enter any column's value into the search box to filter the list of folders. The search is not case-sensitive. If folders are already displayed within the table, the table results are filtered in real time with each keystroke. To reload folders from the endpoint when searching, enter search criteria and then refresh, as described below.
-
Refresh: Click the refresh icon or the word Refresh to reload folders from the Email endpoint. This may be useful if folders have been added to Email. This action refreshes all metadata used to build the table of folders displayed in the configuration.
-
Selecting a Folder: Within the table, click anywhere on a row to select a folder. Only one folder can be selected. The information available for each folder is fetched from the Email endpoint:
- Name: The name of the folder.
Tip
If the table does not populate with available folders, the Email connection may not be successful. Ensure you are connected by reopening the connection and retesting the credentials.
-
-
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 2: Specify filters¶
In this step, specify the email criteria to filter by. Each user interface element of this step is described below.
Note
If input in a combination of the From, Subject, To, CC, Start Date, or End Date fields is specified, only email that satisfies all of the provided filter criteria will be retrieved. Using wildcard characters is not supported.
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [
into the field or by clicking the variable icon to display a list of the existing variables to choose from.
-
From: Enter a single sender email address or a fragment of a sender email address.
-
Subject: Enter a single subject line or a fragment of a subject line.
-
To: Enter a single recipient email address or a fragment of a recipient email address.
-
CC: Enter a single CC recipient email address or a portion of a CC recipient email address.
-
Start Date: Enter the beginning email date, in the format of
yyyy-mm-dd
. -
End Date: Enter the ending email date, in the format of
yyyy-mm-dd
. -
Maximum Number of Returns: Enter the maximum number of unread emails to be returned in the response. Leave this field blank to return all available unread messages.
-
Include Attachments: Select to include email attachments in the response (selected by default).
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 3: Review the data schemas¶
Any request or response schemas generated from the endpoint are displayed. Each user interface element of this step is described below.
-
Data Schemas: These data schemas are inherited by adjacent transformations and are displayed again during transformation mapping.
The response data schema consists of these nodes and fields:
Response Schema Node/Field Description readEmailResponse
Node of the email response item
Node of the item of email recipients recipients
Node of email recipients to
Node of recipients of the email "to" field item
Node of the item of recipients of the email "to" field #text
String value of a single "to" recipient email address cc
Node of recipients of the email "cc" field item
Node of the item of recipients of the email "cc" field #text
String value of a single "cc" recipient email address dateTime
String of the date and time that the email was sent from
String of the email "from" field subject
String of the email "subject" field mailBody
String of the email "body" field attachments
Node of email attachments item
Node of email attachments item fileName
String of the email attachment filename base64content
String of the base64-encoded attachment content
Tip
You can use Jitterbit's
Base64Decode
function to decode attachment content.fileSize
String of the binary file size for the email attachment fileBase64Length
String of the base64-encoded character length for the email attachment -
Refresh: Click the refresh icon or the word Refresh to regenerate schemas from the Email endpoint. This action also regenerates a schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Next steps¶
After configuring an Email Read Email activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure the operation settings, which include the ability to chain operations together that are in the same or different workflows.
Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity actions menu in Connector basics.
Email Read Email activities can be used as a source with these operation patterns:
- Transformation pattern
- Two-target archive pattern (as the first source only)
- Two-target HTTP archive pattern (as the first source only)
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.