Okta Workflows How-To: Send an Email With an Attachment from Workflows

Okta Workflows is a no-code platform for automating identity processes. 

This blog post is based on a question asked during office hours or the #okta-workflows channel in MacAdmins Slack: How to send an email with an attachment?

Getting started

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. 

workflows howto email attachment gmail
Sending an email with an attachment

This is how the email looks when received: 

workflows howto email attachment sent2
Email with attachment

If you have a private file on 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. 

workflows howto email attachmnent from drive
Attaching a file from Google Drive

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. 

workflows howto email attachment pdf
An email with an attachment

Using Box to download a file: 

workflows howto email from box
Attaching a file from Box

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 creates a list of files. 

workflows howto email 3files
Sending an email with multiple attachments using Office 365 Mail

Email received with three attachments:

workflows howto email 3files sent
Email with multiple attachments

SendGrid is another connector you can send emails. We will cover using SendGrid in another blog post.

Get your Workflows questions answered

Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help. 

 

Tags

Workflows