Sending email attachments using the Email connector
The Email connector can be used with a file upload component to upload files and then include them as attachments in an email.
Before you begin
Before using this worked example, ensure that you are familiar with the following concepts and procedures:
-
Installing the Email connector. See Email connector.
-
Creating new flows. See Creating a new flow.
-
Setting up flows using steps on the flow canvas, and running/publishing flows. See Building and publishing flows.
-
Working with file upload components. See File Upload component.
About this worked example
This worked example is provided for illustration purposes only, to demonstrate the example steps and settings involved in using a file upload component in combination with the Email connector to upload and then include file attachments in a flow email.
Installing the Email connector
The Email connector is first installed and configured to allow emails to be sent from within the flow. In this example, the is configured to send emails from a Gmail account, which requires additional configuration.
Setting up the flow
Once the Email connector is installed, a new flow is created and named "Email connector - send email attachments".
To use the Email connector in the new flow, it is imported into the flow as a shared step. Shared steps are 'global' tenant steps that can be shared and re-used across multiple flows within a tenant. See Shared steps.
In this example, the simple flow consists of 4 steps:
-
A page step contains a file upload component that uploads a file to the Email connector.
-
An operator step is used to assign the uploaded file object into a list value.
-
A message step is used to connect to the and send the email using a Send email message action.
-
A step step provides a simple confirmation page once the message action has been performed and the email sent.

Page: A file upload component is added to the page layout/page step, with the Email connector selected as the Data Source.

Operator: A single operator is added to the operator step, to convert the uploaded file object into a list value.
Note: This operation is required as the Send email message action requires the attachment data to be in the form of a list value.

Message: A Send Email message action is added to the message step, and values created and configured as follows:
-
Attachments: The "Attachment List" value is selected to include the uploaded file as an attachment.
-
Body: A simple "Hello. This is the body of the email." message is entered.
-
HTML Body: A simple "Hello. This is the body of the email." message is entered.
-
From: A contact object value containing the Gmail email address set up for the Email is selected.
-
Subject: A simple "This is the subject of the email." message is entered.
-
To: A contact object value containing the recipient email address(es) is selected.
Step: A simple "The email was sent." message is entered into the presentation step.
Running the flow and sending the email
When the flow is run:
-
A user uploads a file using the file upload page component. The operator then maps this into a list value.
-
When the user proceeds through the flow, the message action is performed, and the email is sent to the recipient(s).
-
The flow proceeds to the presentation step, displaying the "The email was sent." message to the user.
-
The recipient(s) receive an email using the values that were set up in the message action, along with the file attachment.
Storage of email file attachments
Files uploaded to the Email connector are only stored temporarily.
If you require email attachment files to be stored more permanently, you can configure a file upload component to use the Amazon S3 connector instead.
For example, to store the email attachments in this worked example into an Amazon S3 bucket, the following changes would be required:
-
The Amazon S3 would need to be installed/configured in the tenant, and imported into the flow.
-
The Data Source of the file upload component would be changed to point to the Amazon S3 .