How to Send an Email With an Attachment from Workflows
Tags: nocode, workflows, okta, ipaas
Published: 2022-08-29 18:58:50

---
title: How to Send an Email With an Attachment from Workflows
published: true
date: 2022-08-29 05:50:14 UTC
tags: NoCode, Workflows, okta, ipaas
canonical_url: https://maxkatz.net/2022/05/31/how-to-send-an-email-with-an-attachment-from-workflows/
---

[Okta Workflows](https://www.okta.com/platform/workflows/) how-to guides are questions and answers from weekly community [office hours](https://calendly.com/oktaworkflows/group-office-hours-okta-workflows), MacAdmins [Workflows Slack channel](https://www.macadmins.org/), and other places. Read all previous [how-to guides](https://maxkatz.net/okta-workflows-how-to-guides/). 

Read all the other how-to guides ⤵️
{% embed https://dev.to/oktaworkflows/all-okta-workflows-how-to-guides-4nl9 %}

On to the question. 

**_How_ to send an email with an attachment?**

Workflows has three connectors to send emails:

- Gmail
- Office 365 Mail
- SendGrid

Usually the quickest way to send an email with an attachment is to download a file with **File – Download** card and send it to **Gmail – Send Email with Attachment** card. The file you want to send needs to be publicly available on the internet.

[![Sending an email with an attachment](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_gmail.png?w=920)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_gmail.png)
<figcaption>Sending an email with an attachment</figcaption>

This is how the email looks when received:

[![Email with attachment](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_sent2.png?w=798)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_sent2.png)
<figcaption>Email with attachment</figcaption>

If you have a private file on a Google Drive or Box you can download it and also send it as an attachment.

In this example a file is downloaded from Google Drive using the **Google Drive – Download File** card. The card only returns the file content so the **File – Info** card is used to read the file information such as its name and then passed to **Send Email with Attachment** card.

[![Attaching a file from Google Drive](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachmnent_from_drive.png?w=1024)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachmnent_from_drive.png)
<figcaption>Attaching a file from Google Drive</figcaption>

**File ID** is the ID of the file to download. You can get this information from the URL when viewing the file. You can also get the file’s ID from its share link.

[![Email with attachment](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_pdf.png?w=834)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_attachment_pdf.png)
<figcaption>Email with attachment</figcaption>

Using Box to download a file:

[![Attaching a file from Box](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_from_box.png?w=1024)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_from_box.png)
<figcaption>Attaching a file from Box</figcaption>

Using the **Office 365 Mail – Send Email** card you can attach multiple files. In this flow three files are downloaded and attached to an email. The **Office 365 Mail** card expects a list of files so the **List – Construct** card is used to create a list of files.

[![Sending an email with multiple attachments using Office 365 Mail](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_3files.png?w=1024)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_3files.png)
<figcaption>Sending an email with multiple attachments using Office 365 Mail</figcaption>

Email received with three attachments:

[![Email with multiple attachments](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_3files_sent.png?w=1024)](https://katzmax.files.wordpress.com/2022/05/workflows_howto_email_3files_sent.png)
<figcaption>Email with multiple attachments</figcaption>

SendGrid is another connector you can send emails with. SendGrid is not covered in this how-to guide. I will cover it in another post.

* * *

Two resources to help you learn more:

📘 Try this step-by-step getting started tutorial: [Build Your First Automation With Okta Workflows: Notify When User Is Suspended](https://dev.to/maxkatz/build-your-first-automation-with-okta-workflows-notify-when-user-is-suspended-1l3p-temp-slug-2933517).

📺 Short how-to [Workflows videos](https://youtube.com/playlist?list=PLIid085fSVdvyK8F4xuk49EchBPmAVNHG) to help you become a better automation builder.