Skip to main content

Notifications

Community site session details

Community site session details

Session Id : K+dsSJoT/piNmdvcX76IEP
Power Automate - AI Builder
Answered

Extract information from invoice: error {"statusCode":400,"headers"

Like (0) ShareShare
ReportReport
Posted on 6 Oct 2023 13:18:38 by 31

Hey guys I am just starting to get into AI processing with Power Automate and I can't find the cause of my error since it is a very simple workflow and I don't know where to look anymore. I would appreciate any help! Details of my Flow are attached below.

 

 

Edit: Here is the full error message. 

 

{"statusCode":400,"headers":{"Cache-Control":"no-cache","x-ms-service-request-id":"13e8f54c-c311-45a9-8e11-c2f928de192f,213aa4c6-d6a8-4022-b77e-4a9f8041357c","Set-Cookie":"ARRAffinity=8f87de1b84dd99cabfe17aece58e854545686578cd29bffaf3579e40091a86e215134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DBC6706B7CBA991716114934; path=/; secure; HttpOnly,ReqClientId=4dd70ea2-468c-4612-9e5d-067e3a6ba18b; expires=Fri, 06-Oct-2073 13:00:34 GMT; path=/; secure; HttpOnly,ARRAffinity=8f87de1b84dd99cabfe17aece58e854545686578cd29bffaf3579e40091a86e215134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DBC6706B7CBA991716114934; path=/; secure; HttpOnly","Strict-Transport-Security":"max-age=31536000; includeSubDomains","REQ_ID":"213aa4c6-d6a8-4022-b77e-4a9f8041357c,213aa4c6-d6a8-4022-b77e-4a9f8041357c","CRM.ServiceId":"framework","AuthActivityId":"0fe8210a-6b0c-45b0-9c3d-1e346119f435","x-ms-dop-hint":"4","x-ms-ratelimit-time-remaining-xrm-requests":"1,200.00","x-ms-ratelimit-burst-remaining-xrm-requests":"7999","OData-Version":"4.0","X-Source":"1021274425217639918113313422693227572162181704186892181901911872551952006194156228155,1301171331891132331541712531119519013323815110319520016851120635237711721451006310620312","Public":"OPTIONS,GET,HEAD,POST","Date":"Fri, 06 Oct 2023 13:00:35 GMT","Allow":"OPTIONS,GET,HEAD,POST","Content-Type":"application/json; odata.metadata=minimal","Expires":"-1","Content-Length":"535"},"body":{"error":{"code":"0x80048d0b","message":"{\"operationStatus\":\"Error\",\"error\":{\"type\":\"Error\",\"code\":\"InvalidPredictionInput\",\"message\":\"Encountered an issue when reaching Form Recognizer: InvalidRequest\",\"properties\":{\"BackendErrorCode\":\"InvalidInferenceInput\",\"DependencyHttpStatusCode\":\"400\"},\"innerErrors\":[{\"scope\":\"Record\",\"target\":null,\"code\":\"InvalidRecord\",\"type\":\"Error\",\"properties\":{\"ErrorCode\":\"InvalidRequest\",\"MlIssueCode\":\"InvalidRecord\"}}]},\"predictionId\":null}"}}}
Categories:
  • tym030 Profile Picture
    19 on 25 Apr 2024 at 10:21:07
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    OK So apparently power automate corrupt the data when fetching the attachment. It does so on a random basis

    I found a site that solves the issue 

    base64ToBinary(items('Apply_to_each')?['contentBytes'])
     
  • tym030 Profile Picture
    19 on 25 Apr 2024 at 07:48:45
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    This is the error. The error is not descriptive so that it could point me in the right direction

     

    {"operationStatus":"Error","error":{"type":"Error","code":"InvalidPredictionInput","message":"Encountered an issue when reaching Form Recognizer: InvalidRequest","properties":{"BackendErrorCode":"InvalidInferenceInput","DependencyHttpStatusCode":"400"},"innerErrors":[{"scope":"Record","target":null,"code":"InvalidRecord","type":"Error","properties":{"ErrorCode":"InvalidRequest","MlIssueCode":"InvalidRecord"}}]},"predictionId":null}

  • tym030 Profile Picture
    19 on 25 Apr 2024 at 07:43:26
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    Hi 

     

    i am having the eaxact same issue and is really annoying. One day works fine next day nothing works even the simple AI model for invoice extraction. Did anyone manage to find some sort of solution to this?

  • Rahul_skl Profile Picture
    on 13 Feb 2024 at 10:41:59
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    Dear Sir/mam,

     

    Can you help me out . I am facing the same problem. I posted my concern with screenshot here. It would really be grateful if you could assist me.

     

    Regards,

    Rahul

  • Rahul_skl Profile Picture
    on 13 Feb 2024 at 10:15:13
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    Hello Dennis, 

     

    I am having the same problem. Can you please help me out and i am using the Predict as well as extracting information from documents action from the AI Builder. But i still get the same error while working with both the actions . 

    Also Please note i already made the model using AI builder and wanted to use this model under Predict action for new documents . The new documents are in pdf format but they are scanned images .

     

    Please find my attached flow and the contents under Predict ActionIssueD2.PNGIssueD.PNG

  • Verified answer
    Dennis_ Profile Picture
    31 on 06 Oct 2023 at 15:42:31
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    While running a final test before sending the document, I found the eroor! I still don't know what exactly goes wrong but I now know when. 

    When the flow gets triggered manually everything works fine. But if I use the automatic trigger with the exact same manual trigger mail that worked, it will fail with the shown error.

     

    Although you couldn't help me directly, I discovered the solution on the way of trying to get your help. Thank you!

  • Antrod Profile Picture
    Moderator on 06 Oct 2023 at 15:22:02
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    Np 🙂

    Can you identify the document that causes the issue and send it to our email please? aihelpen@microsoft.com

  • Dennis_ Profile Picture
    31 on 06 Oct 2023 at 14:56:39
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    I don't know how but I messed up like every information I gave you in the last answer. My concentration seems to decline a bit, sorry.

    The error message does in fact appear on the "Extract Information from Invoices" action. I already filtered out every attachement without ".pdf" but I still tried your suggestion with excluding the inline seperately. It still didn't change the error. But I also messed up to write the right error message and gave you the output instead. The eroor message is:

    {"operationStatus":"Error","error":{"type":"Error","code":"InvalidPredictionInput","message":"Encountered an issue when reaching Form Recognizer: InvalidRequest","properties":{"BackendErrorCode":"InvalidInferenceInput","DependencyHttpStatusCode":"400"},"innerErrors":[{"scope":"Record","target":null,"code":"InvalidRecord","type":"Error","properties":{"ErrorCode":"InvalidRequest","MlIssueCode":"InvalidRecord"}}]},"predictionId":null}

     

    Do you have another Idea that I could try?

    (Maybe it has something to do with the language? It is a german invoice)

  • Antrod Profile Picture
    Moderator on 06 Oct 2023 at 14:19:44
    Re: Extract information from invoice: error {"statusCode":400,"headers"

    If the error is on the create file, I may not be able to help much, perhaps an invalid content. However if the error is on the AI Builder action, it could occur if the file type or content is not supported. For example, does the email contain signature images? If so it needs to be excluded otherwise it may cause the model to fail.

    Antrod_0-1696601707681.png

     

    Otherwise, it may also be a file format not supported? You can try your attachments directly in the AI Builder Invoice tile within Power Automate > AI models > New model

  • Dennis_ Profile Picture
    31 on 06 Oct 2023 at 14:11:03
    Re: Extract information from invoice: error {"statusCode":400,"headers"
    {"statusCode":400,"headers":{"Cache-Control":"no-cache","x-ms-service-request-id":"13e8f54c-c311-45a9-8e11-c2f928de192f,213aa4c6-d6a8-4022-b77e-4a9f8041357c","Set-Cookie":"ARRAffinity=8f87de1b84dd99cabfe17aece58e854545686578cd29bffaf3579e40091a86e215134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DBC6706B7CBA991716114934; path=/; secure; HttpOnly,ReqClientId=4dd70ea2-468c-4612-9e5d-067e3a6ba18b; expires=Fri, 06-Oct-2073 13:00:34 GMT; path=/; secure; HttpOnly,ARRAffinity=8f87de1b84dd99cabfe17aece58e854545686578cd29bffaf3579e40091a86e215134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DBC6706B7CBA991716114934; path=/; secure; HttpOnly","Strict-Transport-Security":"max-age=31536000; includeSubDomains","REQ_ID":"213aa4c6-d6a8-4022-b77e-4a9f8041357c,213aa4c6-d6a8-4022-b77e-4a9f8041357c","CRM.ServiceId":"framework","AuthActivityId":"0fe8210a-6b0c-45b0-9c3d-1e346119f435","x-ms-dop-hint":"4","x-ms-ratelimit-time-remaining-xrm-requests":"1,200.00","x-ms-ratelimit-burst-remaining-xrm-requests":"7999","OData-Version":"4.0","X-Source":"1021274425217639918113313422693227572162181704186892181901911872551952006194156228155,1301171331891132331541712531119519013323815110319520016851120635237711721451006310620312","Public":"OPTIONS,GET,HEAD,POST","Date":"Fri, 06 Oct 2023 13:00:35 GMT","Allow":"OPTIONS,GET,HEAD,POST","Content-Type":"application/json; odata.metadata=minimal","Expires":"-1","Content-Length":"535"},"body":{"error":{"code":"0x80048d0b","message":"{\"operationStatus\":\"Error\",\"error\":{\"type\":\"Error\",\"code\":\"InvalidPredictionInput\",\"message\":\"Encountered an issue when reaching Form Recognizer: InvalidRequest\",\"properties\":{\"BackendErrorCode\":\"InvalidInferenceInput\",\"DependencyHttpStatusCode\":\"400\"},\"innerErrors\":[{\"scope\":\"Record\",\"target\":null,\"code\":\"InvalidRecord\",\"type\":\"Error\",\"properties\":{\"ErrorCode\":\"InvalidRequest\",\"MlIssueCode\":\"InvalidRecord\"}}]},\"predictionId\":null}"}}}

    That is the full error message it appears on the "Create file" OneDrive action

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - AI Builder

#1
VictorIvanidze Profile Picture

VictorIvanidze 4

#1
BK-01100935-0 Profile Picture

BK-01100935-0 4

#3
stampcoin Profile Picture

stampcoin 2

Overall leaderboard