web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / StatusCode 422 when us...
Power Automate
Unanswered

StatusCode 422 when using "Invoke Web Service"

(1) ShareShare
ReportReport
Posted on by 2

Hello,

I would like to make an API call to one of our endpoints to perform intent recognition. However, I'm encountering issues when using the "Invoke Web Service" action.

The flow is supposed to scan all emails in the inbox, perform intent recognition on the entire email body, and then forward it to different mailboxes based on the detected intent.

 

The problem arises during the intent recognition because the email body contains line breaks, special characters, etc.

If I remove all these elements and provide a completely formatted text without them, the request is successfully sent, and I receive a response.

 

However, if such elements remain in the email body, the following error occurs:

Additional info: { "StatusCode": 422.0 }

The remote server returned an error: (422) Unprocessable Entity.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Failed to invoke web service: The remote server returned an error: (422) Unprocessable Entity.. ---> System.Net.WebException: The remote server returned an error: (422) Unprocessable Entity. at System.Net.HttpWebRequest.GetResponse() at Microsoft.Flow.RPA.Desktop.Modules.Web.Actions.InvokeWebServiceBase.<>c__DisplayClass51_0.<Execute>b__0() --- End of inner exception stack trace --- at Microsoft.Flow.RPA.Desktop.Modules.Web.Actions.InvokeWebServiceBase.<>c__DisplayClass51_0.<Execute>b__0() at Microsoft.Flow.RPA.Desktop.Modules.Web.Actions.WebActions.Execute(Nullable1 revocationCheckOption, ILogger1 logger, Action action) at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary2 inputArguments, Dictionary2 outputArguments)

 

Is there an "easy" way to filter and replace such elements in the entire email body so that \n, \r, " etc. are substituted? (Using the Replace functionality has proven to be very tedious. Especially when I have to use \char(31) and so on to tell him what the Symbol is suppose to be)

 

I am using the Power Automate Desktop variant and flows (I have a working flow in the Cloud Version, but not in the Desktop one)

 

Thanks for your time and kind regards 

Eric

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard