In this post, let us look how we are going to handle the Office
365 SharePoint action errors that occurs on Microsoft Flow platform.
Problem Statement: There is an option to get the user
profile property on Microsoft Flow using SharePoint REST API. We need to handle
if there is any error to this action. Let us see how to handle/catch the error
and send a mail with error details.
Sometime back I have published an article for updating user display names for items created on SharePoint using Microsoft
Flow. We will use the same concept here, but only we will see how to catch and
send the error details over mail.
- Create a trigger to fire the flow whenever an item is created.
- Create a SharePoint action “Send an HTTP request to SharePoint”, to get the user profile property details as explained in the article mentioned above.
- Parse JSON data to get the exact required property (user display name).
- Update the same item with author name field with the value retrieved.
Handling Error:
- Just after the “Send an HTTP request to SharePoint” action, add a parallel branch with an action.