How to write inline JavaScript code in a Power Automate Flow

How to create an Azure Function App

Image of the landing page when logged into Microsoft Azure Portal.
Image of the first step when adding a new resource in Azure Portal.
Image of the resource list in Azure Portal.
Image of the pane for adding a Function App resource.
Image of how it looks when creating a new resource group during the creation of Function App creation.
Image of how it looks when adding basic information for the Function App.
Image of the Review and Create during the process of adding a Function App.
Image of the deployment of the Function App is in progress.
Image of the completed deployment process and how to navigate to the Function App.
Image on how to navigate to the code editor in Azure Portal for Function Apps.
Image of the steps to create a new function within a Function App.
Image of status after creating a function within a Function App.
Image on how to navigate to Functions within a Function App.
Image of the Code + Test view in Azure Portal for Function Apps.
Image of the Function App code that allows us to write code in Power Automate.
Image of the button to get the function app URL.
Image of the URL for the function app.

Building the Power Automate Flow

Image of how to create a new Instant cloud flow within a solution.
Image of the dialog that opens after creating a new instant cloud flow.
Image of how to initialize a variable on Power Automate.
Image of the creation of a string variable containing special characters in Power Automate.
Image of how to add an HTTP action in Power Automate.
Image of how to fill out the HTTP action for calling the Azure Function and adding JavaScript code to be executed by the function.
Image of how to add the compose action in Power Automate.
Image of how to add the HTTP body to the compose action.
Image of the flow run using Azure Function and inline JavaScript code to replace special characters in the string within Power Automate.
The result of the HTTP action calling the Azure Function within the Power Automate flow.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fredrik Engseth

Fredrik Engseth

Consultant | Developer | Dynamics 365 | Power Platform | Azure