Category Archives: Dynamics CRM
Enhancing Dynamics 365 Forms with JavaScript: Real-Time Field Visibility and Multi-Select Handling
For businesses using Dynamics 365 CRM, creating a customized and automated user experience is essential for improving efficiency. JavaScript empowers developers to tailor form behavior based on user input or specific business logic, making your CRM highly adaptable. Are you looking to automate form fields and improve usability in Dynamics 365 CRM? This guide will help you understand how to use JavaScript to dynamically control field visibility and behavior. Research shows that 88% of users are more productive with tailored CRM systems. Automating workflows within Dynamics 365 CRM can reduce user errors by up to 70%, streamlining operations and enhancing user satisfaction. Dynamics 365 CRM is highly customizable, and using JavaScript to enhance form behavior can significantly improve operational efficiency and user experience. Automating processes like field visibility and data handling minimizes manual intervention and ensures consistency. At CloudFronts, we have extensive experience implementing Dynamics 365 CRM solutions, tailoring them with custom scripts to meet unique business needs. Through hands-on knowledge, we provide practical insights into achieving optimal CRM configurations. Setting Up Your Dynamics 365 CRM Environment – Go to the CRM main page, click Settings > Advanced Settings. – Select Solutions and create a new solution. – Provide a meaningful name and include the publisher’s name. Develop a Web Resource – After creating the solution, develop a web resource and ensure your code is included in it. – After writing the code, upload the JavaScript and save it as a web resource in make.powerapps.com. Write your JavaScript code We’ll look at two key functions in the provided code: toggleExchangeReturnField and onChangeExhReturnItem. Let’s break them down. Key JavaScript Functions in Action Function 1: Toggling Fields Based on User Input Toggling Fields Based on the Toggle Control toggleExchangeReturnField: function(executionContext) { var formContext = executionContext.getFormContext(); // Get the form context var toggleField = formContext.getAttribute(“cri_rma”).getValue(); // Get the value of the toggle field if (toggleField == true) { formContext.getControl(“cf_exchangereturnitem”).setVisible(true); // Show the exchange return item field formContext.getControl(“cri_rmatype”).setVisible(true); // Show the return type field } else { formContext.getControl(“cf_exchangereturnitem”).setVisible(false); // Hide the exchange return item field formContext.getControl(“cri_rmatype”).setVisible(false); // Hide the return type field } }, The `//` symbol in JavaScript is used to add comments within the code. Comments are helpful for explaining the logic or purpose of the code, making it easier for others (or even yourself) to understand later. However, including comments is optional and not mandatory. Explanation executionContext.getFormContext(): This function retrieves the form context, which provides access to the form’s controls and attributes. formContext.getAttribute(“cri_rma”).getValue(): This gets the current value of the cri_rma field, which is assumed to be a toggle field (a boolean that indicates whether the user has opted for an exchange or return process). formContext.getControl(“cf_exchangereturnitem”).setVisible(true): Based on the value of the cri_rma field, the cf_exchangereturnitem and cri_rmatype fields are either shown or hidden using the setVisible() method. Purpose: This function is designed to hide or show form fields dynamically based on the selection in the toggle field (cri_rma). If the toggle is set to true (i.e., an exchange/return is required), it displays the cf_exchangereturnitem and cri_rmatype fields. Otherwise, these fields are hidden. Purpose: Dynamically show or hide fields based on a toggle field’s value. How it works: Retrieves the toggle field’s value and sets the visibility of dependent fields accordingly. Function 2: Handling Multi-Select Field Changes Handling Changes in the Exchange Return Item Field onChangeExhReturnItem: function(executionContext) { var formContext = executionContext.getFormContext(); // Get the form context var selectedoptions = formContext.getAttribute(‘cf_exchangereturnitem’)?.getSelectedOption(); // Get selected options from the multi-select field var exchangeReturnProductDescription = “”; if (selectedoptions != null) { selectedoptions.forEach(ele => { exchangeReturnProductDescription += ele.text + “,”; // Append the text of selected options }) exchangeReturnProductDescription = exchangeReturnProductDescription.slice(0, -1); // Remove the last comma formContext.getAttribute(‘cf_exchangereturnproduct’).setValue(exchangeReturnProductDescription); // Set the field value with selected options formContext.data.save(); // Save the data } else { formContext.getAttribute(‘cf_exchangereturnproduct’).setValue(null); // Reset the field if no options are selected } } The `//` symbol in JavaScript is used to add comments within the code. Comments are helpful for explaining the logic or purpose of the code, making it easier for others (or even yourself) to understand later. However, including comments is optional and not mandatory. Explanation formContext.getAttribute(‘cf_exchangereturnitem’).getSelectedOption(): This retrieves the selected options from the multi-select field cf_exchangereturnitem. This field likely holds a list of items that the user can select for return or exchange. exchangeReturnProductDescription += ele.text + “,”;: For each selected option, the code concatenates the text (name) of the item with a comma to build a string of product descriptions. formContext.getAttribute(‘cf_exchangereturnproduct’).setValue(exchangeReturnProductDescription): The concatenated string of selected items is then assigned to the cf_exchangereturnproduct field. This could be a text field that lists the products selected for exchange or return. formContext.data.save();: After updating the field, the form data is saved to ensure the changes are persisted. formContext.getAttribute(‘cf_exchangereturnproduct’).setValue(null);: If no items are selected, the field value is reset to null. The most crucial step is to add the lines of code within the field. Above all, we need to ensure that the function is added to the form properties. This process will be demonstrated below. Purpose: Builds a comma-separated list of selected items and updates a designated field. How it works: Gathers user selections and updates the field in real time, saving changes instantly. Final Code for Execution Binding the JavaScript Functions to Form Events – Open the desired form in your solution at make.powerapps.com and select Entities > Forms. – Add the JavaScript web resource to Form Properties. – Under Form Libraries, click Add, select the JavaScript Web Resource you created earlier, and click OK. Bind the toggleExchangeReturnField and onChangeExhReturnItem functions to relevant field events – In the Form Editor, select the field (e.g., a text field or lookup) for which you want to trigger the OnChange event. – In the Field Properties window, go to the Events tab. – Under OnChange, click Add to create a new event handler. – Select the Library … Continue reading Enhancing Dynamics 365 Forms with JavaScript: Real-Time Field Visibility and Multi-Select Handling
Share Story :
How to Send D365 CRM Emails with Attachments Using Power Automate
Introduction In this guide, we’ll walk through the process of sending emails from D365 CRM with attachments using Power Automate. This step-by-step approach will help you understand how to automate your email communications from CRM with attachments efficiently. Use-Case Let’s say you’re working on a project where you need to send emails from D365 CRM that include attachments. In this example, the document is stored in SharePoint, and its URL is linked within the CRM record. This setup is common in CRM where files are centrally stored in SharePoint but need to be easily accessible in CRM for email communication and tracking in CRM. However, this approach is versatile—whether you want to attach specific documents, generate them dynamically, or handle a range of file types, it can be adapted to meet your use-case needs. Why this solution? Main objective of using D365 Emails is the ability to track the emails to the record to keep track of communications in timeline. Also, manually attaching documents to each email is time-consuming and prone to errors. With Power Automate, you can automate this process, ensuring that every email includes the right attachment without extra steps. This solution not only saves time but also reduces the risk of sending incorrect or outdated files, keeping your communications accurate and efficient. Implementation – Step by Step As per my use-case, I have added a column in Accounts table that will hold my SharePoint file URL which I’ll use in power automate. Step 1: Trigger the Flow when a flag is marked true to send email report. Step 2: Get the file content using SharePoint path Step 3: Create a new ‘Email Message’ record in data verse (Add a new row) Step 4: Add a new row for ‘Attachments’ and link to email message record Add the custom value as shown below Add Base64 to your file content Add file name Step 5: Send the email That’s it Let’s test it – Results Trigger the flag (as per my use-case) The Email record with attachment Conclusion By integrating Power Automate to handle attachments from SharePoint, you streamline your email process, save time, and minimize errors. This solution is especially valuable for cases requiring frequent attachments or centralized file storage, as it keeps communication efficient and files up-to-date. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
Automating Opportunity Timeline Updates for Owners and Sales Teams in Dynamics 365 using power automate
What is Opportunity in D365 CRM? The opportunity table represents a potential sale to new or established customers. It helps you to forecast future business demands and sales revenues. You can create a new opportunity in Dynamics 365 for Customer Engagement to monitor an inquiry from your existing customer or convert a qualified lead into an opportunity. Opportunities are frequently used by salespeople to monitor the sales engagements they are presently working on. For More details, please follow the linkhttps://learn.microsoft.com/en-us/dynamics365/sales/developer/opportunity-entities What are Notes in Timeline Section of D365 CRM? The timeline makes the entire history of activities visible to app users. The timeline control is used to capture activities like notes, appointments, emails, phone calls, and tasks to ensure that all interactions with the related table are tracked and visible over time. Use the timeline to quickly catch up on all the latest activity details. For More details, please follow the link https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/set-up-timeline-control Use Case: Using Power Automate, whenever the notes in the Opportunity’s Timeline are updated, an automated email will be sent to the Opportunity Owner and associated Sales Team in the timeline of that Opportunity. Steps: – Login to make.powerautomate.com with your CRM credentials and you will land onto this page. – Once you have landed into Power Automate Page, click on Create and selected Automated Cloud Flow – Set your Trigger as the below since the flow should start working only when the Notes are added in the timeline of the Opportunity. – I have also set a certain condition to this flow. In other words, it checks whether there is a non-empty value in _objectid_value and that this value’s type is ‘opportunities’. The expression returns true if both requirements are satisfied and returns false otherwise. – The Expression is @and(not(empty(triggerOutputs()?[‘body/_objectid_value’])), equals(triggerOutputs()?[‘body/_objectid_type’], ‘opportunities’)) – Then Initializing variable for Email Addresses – Initializing variable for Notes Table – Retrieving the Owner’s Email Address. This step is necessary to obtain the Opportunity Owner’s email address so that we can send the initial notification email to them. – List All Notes in the Opportunity. We use the List rows action to retrieve multiple Note records associated with the Opportunity. This allows us to access all the notes within the Opportunity’s timeline. – Get opportunity by ID. Here we are fetching the complete details of to access all the fields and data associated with the specific record. We are filtering out based on name and opportunity id. The row ID is typically obtained from another step in your flow, such as a “List rows” action or a trigger that provides record details. My record details where I need fetch details is from Opportunity. – After retrieving the record, we need to fetch details of the associated Sales Team. This ensures that whenever a record is linked to the Sales Team, all members of the Sales Team receive an email notification. Thus, we are connecting the Sales Team to the Opportunity to include them in the notification process. The Fetch XML needs to be taken from Advanced Find in CRM. – In this step, we need to store the email address of the sender (i.e., the “From” user). We initialized this variable in step 3, so here we will save the GUID of the sender into that variable. – In this step, we need to save the email address of the recipient (i.e., the “To” user). We initialized this variable in step 3, so here we will store the GUID of the recipient into that variable. a participationtype mask of 2 indicates a specific participant role or type, i.e., sales team members associated with this Opportunity. – Next, we need to ensure that the content is structured within a table. As specified in step 6, I created a variable called `NotesTable` to hold this data. We will use this table to format the content into an HTML table for the email. – In this step, we are configuring the URL link for the Opportunity. Include the base URL of the environment and append the unique identifiers for both the Opportunity and the Topic field (which is a field within the Opportunity). – Sending an Outlook Email to the Opportunity Owner and Sales Team associated with the Opportunity. This Outlook mail works only if ‘Email Addresses Sales Team is Skipped’. – In Power Automate, adding a new row typically involves using actions provided by connectors such as Dataverse, SQL Server, SharePoint, or others, depending on where your data is stored. Here we have created an email body in this action. – In this step, we are using a bound action to send emails within the CRM system. Output: – Once, I click on Add Note, waiting 5-10 seconds and then you find the email within the timeline. Please note that the Email is tracked within CRM itself. – Below is the Opportunity which contains the Opportunity Owner, and the Sales team associated with that Opportunity. The Owner is CF Admin, and the Sales Team Members are Amit Prajapati, Ethan Rebello and Mithun Varghese. – The Opportunity Owner and Sales Team will receive notifications about the Notes in the timeline. All email interactions will be tracked in the Opportunity’s timeline, where you can also view all previous notes associated with this timeline. Conclusion: Automating bulk case resolution using Power Automate in Dynamics 365 CRM offers an efficient way to streamline your workflows and reduce manual errors. By setting up automated email notifications for updates in the Opportunity’s timeline, your sales team and opportunity owners stay informed, ensuring smoother communication and faster response times. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
How to bulk resolve cases using Power Automate?
Introduction When dealing with a large volume of cases, manually handling each one can be time-consuming and error prone. Thankfully, Microsoft Power Automate provides a powerful solution for automating bulk case resolution, streamlining your workflow, and saving valuable time. Why Automate Bulk Case Resolution? Bulk case resolution involves addressing multiple cases at once, which can be necessary for various reasons, such as resolving customer complaints, updating status, or closing resolved cases. Automating this process can: Getting Started with Power Automate Flows Log in to Power Automate and sign in with your credentials. Start a new flow. Click on ‘Create’ from the left-hand menu and select ‘Automated flow’ for a trigger-based flow or ‘Instant flow’ for a manual trigger. Click on ‘Create’ from the left-hand menu and select “Automated flow” for a trigger-based flow or ‘Instant flow’ for a manual trigger. Add an appropriate Flow Name and also, select the Trigger. Once the trigger has been added to the flow, click on ‘+ New Step’ to add an action to process the cases. We have an Excel sheet that contains the records of the cases to be resolved. So, we add an action of ‘List rows present in a table’. Add a step ‘Apply to Each’ where it iterates through list of cases in the Excel sheet and retrieves the case using ‘Get a row by ID’ Finally, add another step ‘Add a new row’ a record of Case Resolution and pass the Case GUID which resolves the case. Conclusion Automating bulk case resolution with Microsoft Power Automate can significantly improve your team’s efficiency, reduce manual errors, and free up valuable time for more strategic tasks. By setting up flows to handle multiple cases at once, you can streamline your workflow and ensure that cases are resolved quickly and accurately. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
Integrating Azure Logic Apps with Common Data Service
Integrating Azure Logic Apps with the Common Data Service (CDS) opens up a world of possibilities for automating business processes and enhancing productivity within your organization. This blog will guide you through the steps to set up this integration, explaining the benefits and practical applications along the way. Azure Logic Apps is a powerful cloud-based service that allows you to automate workflows and integrate apps, data, and services across organizations. The Common Data Service, now known as Dataverse, provides a secure and scalable data storage solution that supports integration with various Microsoft and third-party applications. By integrating these two services, you can streamline data flow and automate complex workflows with ease. Prerequisites Before you begin, ensure you have the following: – An active Azure subscription. – Access to the Common Data Service (Dataverse) environment. – Necessary permissions to create and manage Logic Apps and CDS. Log in to the Azure Portal: Go to Azure Portal. Create a New Logic App: – Search for “Logic Apps” in the search bar. – Click on “Add” to create a new Logic App. – Fill in the required details (name, resource group) and click “Create”. Add a CDS Connector: – Once the Logic App is created, open the Workflow and Add one. – Click on “When a row is added” under Common Data Service triggers. – Sign in to your CDS environment and grant the necessary permissions. Configure the Trigger: – Select the relevant entity – Accounts and specify the trigger conditions – When a row is added. – Accordingly, when a record is added then create a Contact Record. – Save the Logic App Testing Out: Scenario – Create a new account in your Dynamics 365 / Power App. After a few moments, refresh and we see the contact has been created and assigned to the new Account. – So, we know our Logic App has run. Now let’s look at it in the Azure portal. Under Metrics, we see the Logic App has run. Why Integrate Azure Logic Apps with Common Data Service? We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
How to Fix the error ‘’isGlobal information provided True doesn’t match the value stored in DB False.” in D365 CRM.
Each time I attempt to export a solution from the source environment to another environment, I receive the following notification “isGlobal information provided True doesn’t match the value stored in DB False.” As a result, importing the solution into the destination environment becomes challenging for the individual. Whenever this kind of error appears, it has to do something with the fields on the form. This happens when you mistakenly make changes in the Production environment instead of making changes in the Developer environment or Vica Versa. Normally, the procedure is to make changes (e.g., Adding fields or any other customizations) in the Developer Environment and then export those changes to the Production Environment. Once those changes are imported into the Production environment, after cross-checking you realize many more fields are to be added. So we started to create and add fields in the Production environment instead of the Dev environment and that is how a mismatch of errors occurs with Fields and thus it gets difficult to export/import a solution in other environments. To avoid this error, below is the blog you can refer to. Step 1: Log in to Power Apps using your credentials. Try to check both your source environment as well as Destination Environment. Step 2: In order to check the same, Go to Solutions and click on Default Solutions. Step 3: Go onto the table/Entity in which you are currently working. In my case, My table/Entity is Students. Step 4: Try to check the latest field which you have added. In my case, the name of the field is Courses Offered. Step 5: Click on Edit table column. Step 6: As you can see, my Destination environment (Production Environment) consists of the below field (Courses Offered), which is a Global option set Field. Step 7: Whereas my Source Environment (Developer Environment) has the same field name called “Courses Offered” which is an ‘Option Set field’. So, Delete the old option set field from this environment and try again to import this solution to the other environment. Step 8: The Difference between a Global option Set and a normal Option Set is that a global option set can be used globally for all entities/tables. But an option set field can only be used for that specific table. For eg If my entity/table name is “Students”. I can only use my option set for that specific entity. Step 9: In order to avoid the error, download that error log and try to open it via Excel and try to rectify all the fields from that Excel sheet via both environments. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
How to create and add/attach a custom activity-type entity to an existing entity in Dynamics 365 CRM
Introduction Activities are tasks or sorts of homework that we as a team perform when contacting a customer for example making a phone call, making an appointment or calls, and so on. You can set the status of this activity to complete pending or in progress. For more details, please follow the link: Activity entities (Developer Guide for Dynamics 365 Customer Engagement … Steps to create and add/attach a custom activity entity in D365 CRM Step 1: Log in to the required D365 CRM environment using the URL https://home.dynamics.com. by providing a username and password and selecting your environment accordingly. Step 2: Once logging into your Dynamics 365 CRM, select the model-driven app you are currently working on. In my case, it’s Sales Team Member. Step 3: Once you are in your app, Click on the Settings icon and select [Advanced Settings]. Step 4: Click on Solutions. Create a solution or go to an existing solution. Click on Entities once inside the solution and Click on New. Once you name your entity don’t forget to tick on the [Define as an activity entity] checkbox. You can also check boxes on other options according to your need. Step 5: You can also notice the other checkboxes in Communication & Collaboration column, most of the options are non-editable.It’s because we are enabling it as an activity entity. Hence, all the checkboxes related to the Custom Activity Entity get non-editable. Step 6: Now we have to add the custom activity which we created. Click on the entity with which you are working. Then go onto the Forms inside that Entity in which you are working. Step 7: In Forms, once you have done your customizations, Add the activity timeline by enabling it during the entity creation on which you are currently working (checkbox those 2 columns and that’s how you can view the activities timeline in Form). Step 8: Once done with the above step, click on Activities & Notes and you can view the Activities & Notes Timeline. Step 9: Double tap on the Notes timeline and go to Activities. Step 10: Select the custom activity which you created. In my case, it was Order Review. Step 11: Click Ok. Save and Close and don’t forget to Publish the Customizations. Once this is done navigate to the Dynamics 365 CRM Main Form. As you Can the custom entity which we created has been added. Step 12: Click on ‘Order Review’ and add the details. Also, remember you can add many fields to this custom entity as per your requirements. How to do that is by going back to the Solution and navigating to this entity(Order Review). Create or add a new field and then add the Field to the Form. Save and Publish the Customizations. Hope this Helps.!!!
Share Story :
How to add an Entity and fields in Global Search On Dynamics 365 CRM
Introduction Global Search for Microsoft Dynamics 365 is a custom module, which allows you to search across all CRM entities at the same time, providing results in a single-view convenient layout. For more details please follow the link: Global Search for Microsoft Dynamics CRM Online User Manual Adding an Entity and fields in Global Search On Dynamics 365 CRM Step 1: Log in to the required Power Apps environment using the URL https://home.dynamics.com. by providing a username and password and select your environment accordingly. Step 2: Once you have logged into your environment, click on the Settings Icon and select Advanced Settings. Step 3: Drop down Settings and then click on Administration. Step 4: After clicking on Administration, select System Settings. Step 5: Go onto the option Set up Search and then click on Select. Step 6: For FYI, you can select 10 Entities at a time for Global Search. So Select the 10 Entities according to your requirements. We can even sort the Entities using the options Move up and Move down. Step 7: As I have said in Step 5, the maximum number of entities that can be added is 10. Step 8: Once the above steps are done, Return to the below page and click on [Solutions]. Create a solution and add the required table which you wanted to show in Global Search. In my case, the table name is Order Fulfillment. So accordingly add your Entity/Tables. Step 9: Click on the Entity in which you are working inside the solution and click on Views. Step 10: Typically, the global search option in D365 CRM is associated with Quick Find View. Select the Quick Find Active Order Fulfilments view. Step 11: Add the Fields which are needed for View and Find Columns. FYI, in the main D365 CRM Form, the global search has the feature of displaying only the first 3 fields of that view. So insert the important 3 fields in the view first. Step 12: Once all the customizations are done, Save and publish the solution. Step 13: Return to the D365 CRM Main page of our Model Driven App and as highlighted below, click on that icon and try searching for the value of the field. For example, If you have added a field named ‘Order Number’, Try searching the value of that field. Step 14: Once I type the value, the entity in which the value has been present has shown up. For your information, only three fields will be visible once you do the global search and 10 Entities can be visible during the global search. Hope this Helps!!!
Share Story :
How to create a SharePoint site and enable Server-Based SharePoint Integration for Document Management System in D365 CRM
What is a SharePoint site? Sharepoint site is an application which is provided by Microsoft which can be used to store information and content. This may include documents, images videos, tasks, and so many things. For more details please follow the link Steps to create a site and integrate your SharePoint with D365 CRM Step 1: Log in to Office 365 login and open SharePoint. Step 2: Once you click on Sharepoint, go onto the Home icon and click on +Create site. Step 3: Click on Team site. My requirement is to track my project status and to share team resources and co-author content. So that’s why I select the Team site. Step 4: Enter your details for your new site and once done, click on Next. Step 5: You can also add specific members for your site(not necessary). Once done click on Finish. Step 6: Once you click on Finish, it will redirect it to your site which you created. Just copy the above link of your site which I highlighted. Just copy the link to your site. It will be used later. Step 7: Go into Dynamics 365 CRM and login in with your credentials OR mention your URL for e.g. abcde.crm.dynamics.com and then login. Once done, click on the ellipses(3 dots) and select Advanced Settings. Step 8: Drop down the Settings icon and click on Document Management. Step 9: Click on Enable Server-Based Sharepoint Integration. Step 10: In simple terms, what we are doing is integrating and validating the configuration of SharePoint. Click on Next. Step 11: Select Online and then click on Next. Step 12: Enter the URL I previously asked to copy and paste(In Step 6). Paste that link here and click on Next. In the Next Step, it will validate that site. After that click on Finish and wait for 3-4 mins. Step 13: After Refreshing you will observe that Enable Server-Based Sharepoint Integration section has changed to One Note Integration. This means that your SharePoint has been enabled and what’s remaining is to add the entities which need to be stored in Sharepoint. Step 14: In Order to do that, click on Document Management Settings. Step 15: Select the entities which you want to enable for the Document Management System. Step 16: If you want a folder structure based on a certain entity you can check the option Based on entity and select the entity you want. Step 17: Click OK to continue. Step 18: FYI the status is showing me cancelled since I have already created the document management system for these selected entities previously. In your case, the status will show completed if you are doing it for the first time. Step 19: Go onto your SharePoint site and click on Site contents Step 20: Here you can view all the entities which were selected for the Document Management System. Hope this Helps!!!
Share Story :
Trigger Power Automate Flow using JavaScript – Uni-Directional
Hi All, Did you know you can use JavaScript to trigger Power Automate flows and pass input data? So, I’ll show you how to do that, as well as how to pass strict structured data and dynamic schema in Power Automate. In the next blog, I’ll talk about Trigger Power Automate Flow using JavaScript – Bi-Directional Steps to follow for Initial Setup Step 1: Let’s create a Power Automate Flow and define the input JSON schema.Go to: Power Automate Create an Instant Flow with the trigger ‘When a HTTP request is received‘ Step 2: Let’s outline the input schema and then focus on the output in a ‘Compose’ block. I’ll describe two types of inputs. (Strict and Dynamic).Our strict schema will be identified by a specific pattern indicating how the input should be given.Our dynamic schema will be recognised by an unknown pattern, and input will not always be fixed. Click on ‘Use sample payload to generate schema’. Apply the following code, click on Done and you will see the schema in ‘Request Body JSON Schema’. Add a Compose Block to check the output of the request and save the Flow. URL will be generated and is ready to be used. Let’s now proceed to create JavaScript to trigger this flow Steps to follow for calling Flow using JavaScript Since I’ll show the code snippet, adjust it as per your use case. Note: Copy your HTTP Post URL from the trigger as it will be used in the JavaScript Step 1: Type the following code Step 2: Execute the JS with ‘TriggerFlow.Main()‘. Note: Make sure you pass Execution Context to the JS Step 3: Check your Power Automate Flow History and open the Run. That’s how Power Automate is triggered using JavaScript. Hope this has helped you 🙂 Next blog – Trigger Power Automate Flow using JavaScript – Bi-Directional