Tip #1350: Modify webhook return status as needed in Power Automate

Power Automate is very handy to serve as a webhook. Add When a HTTP request is received trigger and you’ll get a URL to call after you save the flow. (Genuinely curious if it should be “an HTTP instead.)

Any flow triggered by HTTP request executes asynchronously, i.e. it returns to the caller immediately after accepting the input. Your flow by default will return to the caller with HTTP status 202 (Accepted). The problems start if you have no control over the calling party and the implementation is a complete bonker very sensitive to the return codes. For example, one of the form engines I’m using (part of the Elementor page builder in WordPress, if you must know) wouldn’t take 202 for an answer and believes that something went wrong on the other end.

To modify the return status code, simply add HTTP Response action at the end and specify any status you feel is appropriate.

For now I’m keeping it PG with status 200 but a few evil scenarios come to mind…

Cover photo by P C from Pexels

Leave a Reply

Your email address will not be published. Required fields are marked *