Okta Workflows how-to guides are questions and answers from weekly community office hours, MacAdmins Workflows Slack channel, and other places. Read all previous how-to guides.
On to the question.
How to send an email with an attachment?
Workflows has three connectors to send emails:
- Office 365 Mail
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.
This is how the email looks when received:
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.
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.
Using Box to download a file:
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.
Email received with three attachments:
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.
📺 Short how-to Workflows videos to help you become a better automation builder.
Leave a Reply