Cloudflows Archives -

Tag Archives: Cloudflows

Trigger Power Automate Flow using JavaScript – Bi-Directional

Hi All,  This blog will be a continuation of my previous blog –  Trigger Power Automate Flow using JavaScript – Uni Directional Now, feedback is essential when sending a request to determine whether it was successfully performed or failed somewhere.  You can accomplish this by forwarding a response back from where the flow was invoked.  I’ll use the same situation as in my previous blog, where I send a notification by greeting a person’s name if exists, or else I will greet a friend.  Check out my previous blog to learn how to build your Flow and JavaScript.  Steps to pass the response back within Flow​  Step 1: Add a response that will be sent back from where the Flow was invoked.  Quick Tip: I am checking if ‘Name’ is present in my dynamic content. If yes, then greet the person else greet a Friend  Formula: if(contains(triggerBody()?[‘DynamicData’], ‘Name’), triggerBody()?[‘DynamicData’][‘Name’], ‘Friend’)  Steps to add into the JavaScript Step 1: Initially we created JS to trigger the flow, now we will add the code snippet to accept the response from Flow. Add the following Code: Step 2: Trigger the JS and watch the output I get as Alert (I have used the console page to trigger my JS for example purposes) Hope this helps in achieving a response from the Power Automate Flow!

Creating HTML table using Power Automate

The Create HTML Table action in Power Automate is a useful tool, but lacks any formatting or styling options. In this blog, we’ll see how to create a HTML table in Power Automate. Use Case: When quote is marked as won, close opportunity as won and send Email to the owner of the Opportunity with below details –  Email Subject – Opportunity Won! Email Body – Customer Name –  Below Table- Solution:Step 1-The requirement is quote should be modified and marked as Won. Trigger on When Quote Modified. Step 2- Initializing the customer with variable actions Step 3- Put a condition that the trigger works only when quote is Won (status code=4), then change opportunity to Won. Step 4- On quote status marked as Won, update the opportunity as Won. Step 5- Listing Accounts associated with Opportunity Step 6- Use Compose: Data Operation and enter the required record URL. Edit the Id by entering the opportunity Id from dynamic content. Similarly for quote URL details as well. Step 7- Using select operation to create a required table in the given format. Using href tag place the outputs of opportunity link and quote link in the key section respectively. Step 8- Create a HTML table and enter the output table of select operation. Step 9- Create 3 new steps using Compose operation to remove the unrequired part of the URL using replace expression. Step 10- Create a new step using compose operation and enter the required CSS style for the table to be sent in the mail and attach the final output in the inputs. Step 11- Send an Email and enter the final output in the Email body. Step 12- Email sent This is how we create HTML table in Power Automate. Hope this helps!!

Read items from Array in Power Automate

Let us consider we have array [1,2,3] and want to read each value in Power automate. Let see how we can read array in Power Automate Step 1- Create array (here you can use your array) Here I have array [1,2,3] and now I want read each value of array in loop Step 2 – Add apply to each step In a apply to each step, Add output of array. In this case we have compose. Step 3 – Add action compose and use expression item() to read array from compose Now Save and try to run the flow. In this way you can read value from array in Power Automate

Post an MS Form response to MS Teams Channel using Cloud Flows

In this blog, we will learn how to quickly design a simple Cloud Flow to post a message in MS Teams Channel when a user submits a response using MS Form. Step 1: Create an MS Form to get the responses from the targeted user. Go to https://forms.office.com/ and click on New Form to create an MS Form. Now, We will create MS Form that will take the Name, Age, Gender, Service ratting and comment which is optional as feedback. Step 2: Create a Team and Channel to post the responses Here, I am creating an Admin Team (Type — Private Team) that will be used by Management Team for organization. Now, we will add the “Feedback Responses” channel to post responses in Admin Team. Step 3: Create an Org Level Team that will be used by all team member to submit the responses (Optional — You can share the form via email or posted it on the website) Now, we will add the MS Form tab in the newly created “Feedback Form” channel so that team members can submit responses directly from MS Teams. After the channel is created, click on the + button on the top ribbon button to add a new channel tab. Look for MS Form and click to select the type of channel tab. Select Add existing form and choose your created Feedback form. After clicking on the Save button, a new Form Tab will be added to the feedback from channel of your Org Level Teams Check if Team, Channel and Form tab is visible from other users Log in with another and open the Team. Here, I have another user who has access to the Project Name team and Org Team but doesn’t have access to Admin Team as it Private Team for Management. Below is a screenshot for the same: Step 4: Create a Cloud Flow to post the response to the Private Teams channel Login to the Power Automate portal and create an Automated Cloud Flow Look for MS Form Trigger “When a new response is submitted” and click on Create to create Cloud Flow Select the Form in Cloud Flow trigger Add new step Get Response Data from MS Form Connect and select Response Id from triggering body Now, add a new step from Teams Connector Post a message (v3) to post the response in Teams Channel Configure the Team, Channel and Message (According to your requirement) Testing I have submitted the response from the MS Teams using another user: After submitting the response we get the message in the Admin Teams: Hope this helps!!!

Last and First expression in Cloud Flows – Part I

Let see how we can use last and first expression in Cloud Flows. We can use last and first expression get first and last value in array, strings and also we can use first and last expression to get first and last record from list of records in cloud flows Let get started!!!!! Let say you have string named “A Datum Integration” and we want first character of the string, then use below expression. Syntax – first(<string>) I have initialized a string “A Datum Integration”. Add a compose and use first as below. As a result, will get a first character from the string i.e A Output – 2. Similarly, we can use last expression to get last character from the string. In this case character “n” should be output Syntax – last(<string>) Output – Stay tuned for Part II.

Last and First Expression in Cloud Flows – Part II

We have already seen how to extract character from string in Cloud flows. Let see how we can get first and last value in array. I have array of list of records (account records), want to get 1st value in array. Array – Add a compose step in flow and use below syntax to get first value. Syntax- first(<array>) Output – Similarly, we can get last value in array. Syntax – last(<array>) Output – Hope this helps !

Populate Signature In Word Template using Cloud flows

Let see how we can populate signature from CRM to Word Template using Cloud flows First we need to understand how to create word template with Content Controls – Create Word Template with Content Controls In Word Document, Select Developer Tab Under the Developer Tab, Insert picture control After Inserting a picture control, Click on Properties -> Name the Title and Tag according to your requirement. In my case I have named title and Tag as Signature. Now we have created a Word Document with content controls. Upload this document in your SharePoint 2. Populate Signature Field using Cloud flows Signature field in CRM is pen control and when we run a flow, we get the field as below Split the above field by “,” Use below expression – split(triggerOutputs()?[‘body/cf_signature’],’,’) Output of above expression – Initialize a variable of type Object and set the Object as shown below- Content is output of split,To get the output of split expression, use below outputs(‘Compose_2’)[1] Syntax – outputs(<stepname>)[position of array] And save the object in a Compose Populate a Microsoft Word Template Add action “Populate a Microsoft word template” in flow Create File in SharePoint File Content of Create file step is the output of Populated Word Template Input – Output –

SEARCH :

FOLLOW CLOUDFRONTS BLOG :

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :