I have a Flow that triggers when a user drops an excel file into a SharePoint library. Once that happens, the Flow will use the data in the excel to create new cds record.
What I have at the moment is we attempt to create the record and if this fails I send out an email. The issue with this however is we can't single out which fields caused the error.
What I am trying to do is basically try to use the create and update a cds record actions for every single field and then catching that. The only issue is that I have over a hundred fields to do this for and I don't think doing that in Flow will be very good since I'll end up with a hundred actions which I've never done before in Flow and am not even sure can be done.
So this is my current attempt:
This is just for two fields. So for the first one, I try to create the cds record with 'Name', and then the second one I update that same record with the 'Test Currency Column 1' field. And if each fails then I'll add that to a string which will be sent in an email.
Is there another way to do this? Does anybody have any tips on how to do this? I've been thinking of having this Flow call another Flow in order to split up the work between Flows.
Another thing I'm wondering is if there is a way to get the error message returned by a failed action and send that in an email or store it into a variable? So when the action fails, I catch it and then get the error message. Is that possible?
This would be a huge number of API calls to the CDS just for one record. I would recommend you add validations in the Excel itself before attempting to create the record in CDS.
You can also get the row from excel and add those validations in Power Automate and then create a table with the ones that do not match and send an email to the person regarding that.
Lastly, the create/ update record when fail, you can access the error message and it returns the first column value at which it failed and maybe you can map it out from there.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
"Lastly, the create/ update record when fail, you can access the error message and it returns the first column value at which it failed and maybe you can map it out from there. "
Is there dynamic content for this? If I can do this then basically solves all my problems. When my flow does fail it gives a more precise error but my only issue is not being able to grab that. If I could then I could simply use that for the error message in my email.