This article describes how to send an email with an attachment using Gmail and Microsoft Office 365 Mail.
- Okta Workflows
- Gmail
- Microsoft Office 365 (M365 / O365)
- Email Attachment
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.
The flow has these steps:
- The Text-Compose card sets up the file link.
- The File-Download card downloads the file from the specified link. In this example, the file is publicly available on the internet.
- 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.
The following flow downloads an image from Google Drive.
Email a file from Google Drive flow.
The flow has these steps:
- The Google Drive-Download File card downloads the file. You can get the file ID from its share link.
- The File-Info card gets information about the file, including its name. The name is passed to the next card.
- 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.
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
- Send an HTML Email With Data From a Table in Workflows
- Search Okta System Log and Email the Results in Workflows
- Save Deactivated Users, Export as CSV, and Email in Workflows
- Send an Email with an Image in Workflows
- How to Export Group Membership to a CSV File and Email the File in Workflows
- How to Send HTML Email with Gmail and Office 365 Email in Workflows
