Member-only story

Ultimate Guide to Connecting to Office 365 Outlook using Azure Logic Apps

Wael Kdouh
7 min readJan 4, 2022

I recently embarked on a mission to setup an Azure Logic Apps Workflow which is shown in Figure 1. Basically, I wanted to connect to an Azure Blob storage and fetch the files stored inside a container and attach them to an outgoing email. The requirement was that all attachments needed to be included in one email.

Whereas the process of setting this up was straight forward for the most part (after all this is the appeal of Logic Apps), I uncovered a lot of details along the way which will be extremely valuable to you especially if you are about to kick off your journey with Azure Logic Apps.

Figure 1: Azure Logic Apps Workflow to send an email with one or more attachments

Prelude

The first thing I had to decide on was the resource type. Logic Apps support two types. You can either use the Logic App (Consumption) resource type or the Logic App (Standard) resource type. Now I won’t go into the details of how these two options compare as you can find it here. I opted to go with the Standard resource type as I needed VNET integration support.

Whereas there are several blog posts out there describing how to instrument a Logic Apps workflow to connect to an office 365 outlook account in order to send an email with multiple attachments, none of these posts provided the necessary level of details that helped me overcome some of the challenges that I faced along the way. As the old adage goes, the devil lies in the details.

The rest of this blog post presents a detailed solution which will help you overcome some potential pitfalls that you may encounter along the way as you instrument the solution

As shown in Figure 2 the first operation after the Http Trigger is to initialize a variable of array type. This will hold the different files fetched from the Azure blob storage in order to loop through them later on in the workflow and attach them to the outgoing email.

Figure 2: Array variable to hold the files to be attached to the outgoing email

Next operation was to list the blobs in a container. This doesn’t retrieve the blobs (will do that later in the workflow), but simply lists the available blobs.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Wael Kdouh
Wael Kdouh

Written by Wael Kdouh

Principal Cloud Solution Architect at Microsoft. I assist enterprise customers in crafting exceptional architectures for success.

Responses (2)

Write a response