cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Exclude a document type from Form Processing (Document type: xml)

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:

flow.png

 

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:

error.png

 

How could I exclude the xml document type from the Apply to Each loop to avoid this error?

 

Thanks!

 

Fernando

1 ACCEPTED SOLUTION

Accepted Solutions

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:


2020-08-21_17-50-44.png

View solution in original post

4 REPLIES 4
Microsoft
Microsoft

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 @danielbazetto,

 

Correct. The invoice format is PDF.

F

 

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:


2020-08-21_17-50-44.png

View solution in original post

Hi @JoeF-MSFT,

 

Thank you very much for your support! That fixed the problem and now runs successfully. 

Attachment_success.png

 

Best regards,

 

Fernando

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (34,258)