Hello,
I built a flow with AI Builder Form Processing to send notifications in a Teams Channel when an invoice arrives to an email address in pdf format, as follows:
It works correctly except that in Mexico each invoice is accompanied by an xml document for tax purposes, and when the Apply to Each loop finds this document type I get an error:
{"operationStatus":"Error","error":{"type":"Error","code":"InvalidPredictionInput","message":"unable to identify the mimetype input","properties":{"BackendErrorCode":"InvalidInferenceInput","DependencyHttpStatusCode":"400"},"innerErrors":[{"scope":"Record","target":"single","code":"InvalidRecord","type":"Error","properties":{"MlIssueCode":"InvalidRecord","MlIssueTarget":"single"}}]}}
Nevertheless, the flow finishes and performs the actions for the pdf document, i.e. reply to the sender if it was approved or rejected.
When I test the flow sending the email without the xml file then the flow runs successfully:
How could I exclude the xml document type from the Apply to Each loop to avoid this error?
Thanks!
Fernando
Solved! Go to Solution.
Hi @calerof,
One thing you can do is add a condition to check that the Attachments Content-Type is equal to application/pdf, and only in that case process the attachment with AI Builder. Here is how the flow looks:
Hello @calerof
So when you receive the invoices that is not accompanied by another xml file the flow works perfectly, but if that file comes with an accompanied xml the flow fails.
However even with the "Failed" status the flow generates the pdf file required. Is that correct?
Regarding the invoices what is the type of it?
Hi @calerof,
One thing you can do is add a condition to check that the Attachments Content-Type is equal to application/pdf, and only in that case process the attachment with AI Builder. Here is how the flow looks:
Hi @JoeF-MSFT,
Thank you very much for your support! That fixed the problem and now runs successfully.
Best regards,
Fernando
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.