Logic Apps: Async processing pattern

  • Pedro Almeida
  • Apr 26, 2021
  • 2 min read

Sometimes, we need to implement a fire‑and‑forget pattern in Azure Logic Apps. This post is short, but very useful.

By default, Logic Apps follow a synchronous pattern. You call the workflow and must wait for it to finish processing.

So how can we configure a Logic App to accept a request and continue processing without forcing the caller to wait?

📝 One-Minute Brief

Azure Logic Apps are synchronous by default, but some scenarios require a fire‑and‑forget approach. This article explains how to implement an asynchronous processing pattern using the HTTP Response action, allowing callers to receive a 202 Accepted response while the workflow continues processing in the background.

The solution is quite simple, even if it isn’t very elegant.

To achieve this, place a Response action immediately after the trigger. Then, in its settings, enable Asynchronous Response. Although this approach isn’t ideal, it enables the async pattern we need.

Ideally, the trigger would expose a flag to handle this automatically. However, that option is not available yet.

With this configuration, the Logic App sends a 202 Accepted response back to the calling system.

Response 202
Response Async

You can also set custom headers and a body, but it might not help much.

As you can see, the Response will automatically set a location header for you to “ping” to check the status. By default, the engine will refresh every 20 seconds.

So that’s all there is to it; it’s a simple way to achieve an asynchronous pattern with Logic Apps, although not very pretty, but it works!

Happy coding!

#1 Azure Monitoring Platform

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Pedro Almeida

Pedro Almeida is a Senior Integration Developer at Devscope, working with Logic Apps, BizTalk, and other related products. Although he started his career as a Dynamics CRM Consultant, Integrations quickly caught his eyes and has made it his primary area of interest and work. Since then, Pedro has worked with customers from very different areas, from Retail to Banking to Governmental Services and others. You can contact Pedro at pedro.miguel_almeida@outlook.com(Twitter: @ItsNotRcktScnce)

6 thoughts on “Logic Apps: Async processing pattern”

  1. “There should be a flag that you could set in the Trigger to automate this and send back a response like this, but so far, this feature is not available yet.”

    The point at which you want respond that the request is accepted might not be straight after the trigger (JSON payload validation for example)

Leave a Reply

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

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top