PowerApps Track Email with Logic Flows
PowerApps brings with it the ability to create a “Logic Flow“, which in reality allows for cloud services to be connected, consumed easily and perform tasks that otherwise would have taken a whole bunch of code to work.
Once such task would be the inability to perform incoming email like SharePoint On-Premises does. This can be remedied by using a “Logic Flow” in PowerApps.
To create a “Logic Flow” in PowerApps, we need to be in the PowerApps Web site and choose the “Create a Logic flow” link.
This takes us to the screen where we can pick from pre-defined flows.
The one we want to use is the “Track emails in a SharePoint list“.
The idea here is that we would monitor the Office 365 mailbox for new emails and then save them into a SharePoint List as a reference, not quite full incoming email but a start. To get started we need to create the connection to the Office 365 mailbox we wish to use. In my connections list I have two connections to different mailboxes as well as the OneDrive and Twitter one from before.
Within the “Logic Flow“, we need to specify the connection for the “On new email” action.
For this I am selecting the one called “incomingemail“. Once the connection is set we can then set properties for the connections and parameters that filter the emails that we process.
I have set mine to the following:
Now we need to set the connection details for the SharePoint List.
Once the SharePoint Online connection you can select the site collection and list that you wish store the emails.
The next step is to choose the incoming email properties that you wish to use as the “Title” fields in the list.
Now have everything mapped together we can save this “Logic Flow” with a name and it will then publish it into your PowerApps configuration. Once saved it will be listed in the “Logic Flows” screen and also you can “Disable” it from working as needed, edit or delete as needed.
Sending an email to the mailbox should then kick off the “Logic Flow” and the mail should be saved directly into SharePoint using this flow.
Now we wait and see if the process kicks off, grabbing the email sent, and saves a reference to the email, albeit just the “from” field. Now you could of course capture more details as needed.
Each “Logic Flow” has a list of failures and successes that can be accessed from the flow itself.
Then each row can be clicked into to give you some very basic, did it pass or fail values.
Each “Logic Flow” can contain multiple actions and also conditions, to create some very complex flows that interest with multiple systems.
We also have the ability to associate “Logic Flows” to PowerApps that we have created, so as an example we could use the contact application from before and as soon as a new contact is added, have it email us then store values in SharePoint or some other cloud service, bringing all of them together in a cohesive solution.