Citizen Developer
explore our new search
Guide: Calling Asynchronous Power Automate Flow via JavaScript
Image Source:
Power Automate
Oct 20, 2022 1:45 PM

Guide: Calling Asynchronous Power Automate Flow via JavaScript

by HubSite 365 about Fredrik Engseth

Citizen DeveloperPower AutomatePower SelectionM365 Hot News

Learn how to call an asynchronous Power Automate flow with JavaScript to optimize task automation in your applications. Expert advice from Microsoft expert.

In a recent blog post, Fredrik Engseth, a respected authority in the world of software solutions, has contributed an insightful piece about interaction between JavaScript and Power Automate. Specifically, he focuses on invoking an Asynchronous flow from Power Automate with the help of JavaScript.

Being two powerful technologies that are often at the center of modern web applications, Engseth details the intricacies of this combination in his post. This information is particularly useful for developers looking to expand their skill set and incorporate automation elements into their JavaScript applications.

The blog post provides scripts, examples, and step-by-step instructions for achieving the desired interaction between the two technologies. Its detailed, hands-on approach makes it easy to grasp for beginners yet still informative for experienced developers.

Click here for comprehensive information about Power Automate.

Engseth has effectively demonstrated his adept understanding of these technologies, and his work proves to be an invaluable resource for developers entering the field and seasoned veterans alike.

More on Automation alongside JavaScript

Automation has become a significant component of modern web development, especially with JavaScript applications. Its popularity stems from the efficiency and scalability it offers. It enables developers to automate repetitive tasks, speeding up their workflow and increasing overall productivity. The integration with Microsoft's workflow management tool only amplifies these benefits, as it allows for advanced automation tasks and processes to be executed.

In conclusion, the industry is adopting automation at an increasing rate, making understanding and integration of these technologies a crucial skill for any developer.

Read the full article How to Call an Asynchronous Power Automate Flow With JavaScript

Power Automate - Guide: Calling Asynchronous Power Automate Flow via JavaScript

Learn about How to Call an Asynchronous Power Automate Flow With JavaScript

This blog post will guide you on how to trigger an asynchronous automation flow using JavaScript. This is essential if you aim to trigger a flow from a web application or script and wish to continue with other tasks as the flow runs in the background.

We will cover the definition of asynchronous flows and their importance. We then take a peek into how to setup an asynchronous Power Automate flow using the "when a HTTP request is received" connector. This connector helps initiate flows by making HTTP requests. Lastly, we explore how to call asynchronous flows using JavaScript.

Upon concluding this article, the reader shall gain the skill of triggering automation flows from JavaScript and thus, incorporate this knowledge into automating tasks and processes in your applications.


  • A valid Microsoft Power Automate account; for those without one, sign up for a free trial or purchase a subscription is required.
  • Knowledge of Power Automate.
  • Basic understanding of JavaScript, including the use of functions, variables, and conditional statements.


An asynchronous automation flow runs in the background and does not require any user intervention. Also, these flows get triggered by events or schedules and continue running even after the user who initiated them closes the application or logs out.

Asynchronous flows are advantageous when you intend to automate tasks or processes that may take some time to complete—these might include triggering a flow from a web application or a script where you can continue with other tasks while the automation flow runs in the background.

There are a few states an asynchronous flow can be in, these include:

  • Pending: This is the initial state of a promise when it has not yet been fulfilled or rejected.
  • Fulfilled: This state indicates that the promise has been successfully completed.
  • Rejected: This state depicts that the promise has failed, and an error is available.
  • Settled: This state indicates that the promise has either been fulfilled or rejected, and is no longer pending.
  • Canceled: This state indicates that the promise has been cancelled and will not be resolved or rejected.


Asynchronous flows are a category of automation flows that enable you to execute long-running processes in the background without waiting for the process to complete before progressing. This section will guide you on how to build a basic asynchronous automation flow that outputs "Hello [Name]", where you can pass the name in the payload from JavaScript.

Here’s how to create an asynchronous flow:

  1. Sign in to the automation platform portal.
  2. Select "Instant cloud flow" under the "Start from blank" section.
  3. Name the flow, configure the triggers, and save the flow
  4. Enable Asynchronous Response in the settings


This part concentrates on calling an asynchronous flow with JavaScript. The JavaScript code is defined in an async function called checkFlowStatus that sends a POST request to the configured flowUrl with the provided body.

Upon successful execution of the flow, the function will return the flow's final status.

This JavaScript code can be tested directly from the developer console of your web browser.


In this article, we demonstrated how to trigger an asynchronous automation flow from JavaScript. We explained how to setup an asynchronous flow step by step, where a flow can be configured to listen for a request, and once completed, give a response.

More links on about How to Call an Asynchronous Power Automate Flow With JavaScript

How to Call an Asynchronous Power Automate Flow With ...
An asynchronous Power Automate flow is a type of flow that runs automatically in the background. It does not require user intervention. Furthermore, these flows ...
Dynamics 365 – Call Power Automate Flow from JavaScript
Nov 2, 2022 — Go to and choose your environment that you want your flow to run. Select Create from the left navigation. Select ...
Asynchronous HTTP Response from a Flow | Power ...
Mar 22, 2021 — Asynchronous Response · Go to Settings on the Response action step. · In Settings, turn on Asynchronous Response On and save it. · As mentioned in ...


Asynchronous Power Automate Flow, Call Power Automate Flow JavaScript, JavaScript Asynchronous Flow, Power Automate and JavaScript, Trigger Asynchronous Flow, Automate Flow With JavaScript, Asynchronous JavaScript Flow, JavaScript Power Automate Call, Automate Flow Asynchronous JavaScript, JavaScript Asynchronous Automate Flow.