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.
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.
Solved! Go to Solution.
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.
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
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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
23 | |
22 | |
14 |
User | Count |
---|---|
45 | |
33 | |
33 | |
32 | |
30 |