<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Send an Email with an Attachment from Workflows
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to send an email with an attachment using Gmail and Microsoft Office 365 Mail.

Applies To
  • Okta Workflows
  • Gmail
  • Microsoft Office 365 (M365 / O365)
  • Email Attachment
Solution

This article will teach you how to send an email using the Gmail connector in Okta Workflows. It will also cover using the Office 365 Mail connector.

 

Gmail connector

 

This flow uses the Gmail-Send Email with Attachment card and sends the file from https://humanstxt.org/humans.txt.

 

Send an email with an attachment using Gmail 
Send an email with an attachment using Gmail.

 

The flow has these steps:

 

  1. The Text-Compose card sets up the file link.
  2. The File-Download card downloads the file from the specified link. In this example, the file is publicly available on the internet.
  3. The Gmail-Send Email with Attachment card sends the email with the file as an attachment.

This is how the email looks:

 

Email with an attachment 
Email with an attachment.

 

The following flow downloads an image from Google Drive.

 

Email a file from Google Drive flow 
Email a file from Google Drive flow.

 

The flow has these steps:

 

  1. The Google Drive-Download File card downloads the file. You can get the file ID from its share link.
  2. The File-Info card gets information about the file, including its name. The name is passed to the next card.
  3. The Gmail-Send Email with Attachment card sends the email with the file as an attachment.

 

 

This is how the email looks:

 

Email with image attachment


Email with image attachment.

 

Office 365 Mail connector

 

With the Office 365 Mail-Send Email card, you can send multiple files. The flow below downloads two files and attaches them to an email. The Office 365 Mail-Send Email card expects a list of files. The flow uses the List-Construct card to create a file list.

 


Send an email with attachments using Office 365 Mail.

 

Email with two attachments:

 


Email with two attachments.

 

Related Resources

 

 

 

Loading
How to Send an Email with an Attachment from Workflows