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.
Then I will create a table to hold the data.
Then I’ll need to add a row to the table.
And finally I complete the flow by setting the data in my columns.
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.
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:
Now you can adjust the flow to add more fields depending on what you need.