Advertisements

Collecting emails and storing details in Excel using Microsoft Flow

Recently I was asked if it is possible to collect emails from a mailbox and store the email details in for example Excel using Microsoft Flow. Using Flow it is actually extremely easy to create an mail box as a way for people to update a data source. In my example here I will use Excel on OneDrive for Business but you could store the data in any other data store.

First I’m going to start by creating a trigger on a mail box.

When new email arrives trigger

Then I will create a table to hold the data.

create table in Excel

Then I’ll need to add a row to the table.

Add Row to Excel with columns

And finally I complete the flow by setting the data in my columns.

Add row with data

That is too simple isn’t it? Indeed it is.

When you run the flow for the first time the table will be created.  The second time the flow runs you will find that the creation of the table fails.

fail to create table

To get the above successful flow it will be needed to set the run after settings on the Add a row into a table action. You will also find that the Create table needs to be run once before  you can use the fields from the table in the Add a row into a table action.

So how should we go about this?

First create a flow that just runs the Create table action (or of course you could create an excel with a table manually in Excel Desktop). Then after that create the above shown flow without the create table action. resulting in the following 2 steps:

Small

Now you can adjust the flow to add more fields depending on what you need.

 

Advertisements

4 thoughts on “Collecting emails and storing details in Excel using Microsoft Flow

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: