cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to retrieve a SharePoint Flow step error message

Hi

When a certain step on a flow fails, I would like to have the option to send an email notifying me of the error.

Here is an example:

If 'Create item' fails I want to retrieve the error message.Message error.png

I tried to  retrieve the message with body('Create_item)['message'].

However, this is not correct, it's not working and I get an error saying:

 

Unable to process model language expressions in action "Send_an_email_5" entries in line "1" and in "1942" column: "Unable to evaluate model language expression" body ('Create_item') ['message' ], "because the" message "property does not exist. The available properties are" ItemId, Id, Name, DisplayName, Path, LastModified, Size, MediaType, IsFolder, ETag, FileLocator, LastModifiedBy. "See https://aka.ms / logicexpressions for usage details. "

 

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: How to retrieve a SharePoint Flow step error message

Hi!

This is how I solved the issue:

I initialized a variable named Message (before the condition where Create item is hosted, as you cannot initialize variables inside conditions). Then I set the variable to body(Create_item)?['Message'], after 'Create item'.

Now I can retrieve the message to be sent through email.Initialize Variable 2.png

 

 

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: How to retrieve a SharePoint Flow step error message

Hi @Anonymous ,

 

Do you want to retrieve error message when an action failed?

 

Currently, we could configure run-after to send out a notification when a step failed, however, it is not possible to retrieve the error message from the failed step using flow.

 

Please feel free submit a request at Flow Ideas Forum, I will suggest other customers who have the same request vote your idea at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: How to retrieve a SharePoint Flow step error message

Hi!

This is how I solved the issue:

I initialized a variable named Message (before the condition where Create item is hosted, as you cannot initialize variables inside conditions). Then I set the variable to body(Create_item)?['Message'], after 'Create item'.

Now I can retrieve the message to be sent through email.Initialize Variable 2.png

 

 

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,948)