Category Archives: Cloud flows
Retrieve characters/Substring from string in Cloud Flows
In this blog we will see how to retrieve string or characters from string using substring and take method When we want to retrieve character/string from starting index then will use take() method, else will use substring() Let say we want to retrieve first 5 character from string. Eg. – string is Power Automate We will demonstrate this with both the cases. Using Substring Here we are retrieving first 5 characters from string i.e. Power Expression used – substring(‘Power Automate’,0,5) Output – 2. Using take Expression used to retrieve string – take(‘Power Automate’,5) Output – Hope this helps!
Share Story :
Send an Email to all users in a D365 Team using power automate.
D365 gives us a functionality to assign a record to a group of users which can be archived by using a D365 Team these users then are know as members of that respective team, due to functionality restrictions we cannot send an email to a D365 team, however there are a few workarounds by which we can achieve this functionality. Lets consider a case. Suppose we have a D365 team called as “Accounts Associates” we have added a set of users in this team. Now if an invoice milestone is in the ready state i.e. “Ready For Invoicing” we need to send a reminder email to this “Accounts Associates” team to take an action regarding the ready invoicing. Solution :- The following case can be achieved by using an Out of the box functionality i.e. By using a distribution list Note :- (we must have an Microsoft Exchange License). Lets Begin with the implementation. Step – 1 Creating a Distribution List Login to your admin center (Link –https://admin.microsoft.com/) In the Admin center Section of the Left navigation bar select “Exchange”. Under the “recipients” select “groups”. In the “+ New Microsoft 365 Group” pull down the dropdown and add the distribution list. Add the Display name and the “Alias” and save the Distribution list. Add same users which are present in the teams to this Distribution list. Step – 2 Creating a Queue in D365 Go to “Settings” -> “Service Management” ->” Queues” and click on “+NEW” -> give it a name -> “Save” A mailbox would be created with the same name that of the queue. Open the mailbox. The Email address field will be blank, add the Distribution List’s email address created in Step 1. Step -3 Create a New Team or select an Existing Team. In the Default Queue lookup, select the Queue created in Step 2. Step – 4 Create a Flow which triggers on update of a project contract line milestone i.e. When status is ready for invoicing Flow triggers when Project Contract Line is Updated, Condition Invoice Milestone is Ready for invoicing for which click on the “…” select settings and add the following condition in the trigger sectio Get the Teams ID in this case I have hardcoded the ID as no record was associated with it to retrieve it Get the Teams Details. Get the Default Queue to which the email will be triggered . Send an Email to the Incoming Email of that Queue which is Email ID set on the Distribution list. Note : (We will have to Manually add or remove the users from both the Distribution list and the Teams. i.e. both the team and the distribution list must be sync, if a member is added or removed from the team the same should be done in the distribution list ) Output . Hope this helps.!
Share Story :
Send an Email to all users in a D365 Team using power automate
D365 gives us a functionality to assign a record to a group of users which can be archived by using a D365 Team these users then are know as members of that respective team, due to functionality restrictions we cannot send an email to a D365 team, however there are a few workarounds by which we can achieve this functionality. Lets consider a very case. Suppose we have a D365 team called as “Accounts Associates” we have added a set of users in this team. Now if an invoice milestone is in the ready state i.e. “Ready For Invoicing” we need to send a reminder email to this “Accounts Associates” team to take an action regarding the ready invoicing. Solution :- The following case can be achieved by using an Out of the box functionality i.e. By using a distribution list Note :- (we must have an Microsoft Exchange License). Lets Begin with the implementation. Step – 1 Creating a Distribution List Login to your admin center (Link –https://admin.microsoft.com/) In the Admin center Section of the Left navigation bar select “Exchange”. Under the “recipients” select “groups”. In the “+ New Microsoft 365 Group” pull down the dropdown and add the distribution list. Add the Display name and the “Alias” and save the Distribution list. Add same users which are present in the teams to this Distribution list. Step – 2 Creating a Queue in D365 Go to “Settings” -> “Service Management” ->” Queues” and click on “+NEW” -> give it a name -> “Save” A mailbox would be created with the same name that of the queue. Open the mailbox. The Email address field will be blank, add the Distribution List’s email address created in Step 1. Step -3 Create a New Team or select an Existing Team. In the Default Queue lookup, select the Queue created in Step 2. Step – 4 Create a Flow which triggers on update of a project contract line milestone i.e. When status is ready for invoicing Flow triggers when Project Contract Line is Updated, Condition Invoice Milestone is Ready for invoicing for which click on the “…” select settings and add the following condition in the trigger section. Get the Teams ID in this case I have hardcoded the ID as no record was associated with it to retrieve it Get the Teams Details. Get the Default Queue to which the email will be triggered . Send an Email to the Incoming Email of that Queue which is Email ID set on the Distribution list. Note : (We will have to Manually add or remove the users from both the Distribution list and the Teams. i.e. both the team and the distribution list must be sync, if a member is added or removed from the team the same should be done in the distribution list ) Output . Hope this helps.!
Share Story :
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.
Share Story :
Send an email to users in a D365 Team Individually using power automate (without using a distribution list)
D365 gives us a functionality to assign a record to a group of users which can be archived by using a D365 Team these users then are know as members of that respective team, due to functionality restrictions we cannot send an email to a D365 team, however there are a few workarounds by which we can achieve this functionality. Lets consider a very case.Suppose we have a D365 team called as “Accounts Associates” we have added a set of users in this team. Now if an invoice milestone is in the ready state i.e. “Ready For Invoicing” we need to send a reminder email to this “Accounts Associates” team to take an action regarding the ready invoicing Solution :- The following case can be achieved by Looping through all the users in of a D365 Team.Lets Begin with the Implementation. Step 1 – Create a D365 Team.Go to Security – > Teams -> Create a new team. Step 2 – Create a Flow to send email.1. Flow triggers when Project Contract Line is Updated, Condition Invoice Milestone is Ready for invoicing for which click on the “…” select settings and add the following condition in the trigger section. 2.Get the Teams ID in this case I have hardcoded the ID as no record was associated with it to retrieve it3.Get the Teams Details.4.Get the User Details by using the following fetch XML Query. 5. Query :<fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”true”> <entity name=”systemuser”> <attribute name=”fullname” /> <attribute name=”businessunitid” /> <attribute name=”title” /> <attribute name=”address1_telephone1″ /> <attribute name=”positionid” /> <attribute name=”systemuserid” /> <attribute name=”internalemailaddress” /> <order attribute=”fullname” descending=”false” /> <filter type=”and”> <condition attribute=”internalemailaddress” operator=”not-null” /> </filter> <link-entity name=”teammembership” from=”systemuserid” to=”systemuserid” visible=”false” intersect=”true”> <link-entity name=”team” from=”teamid” to=”teamid” alias=”ag”> <filter type=”and”> <condition attribute=”teamid” operator=”eq” uitype=”team” value=”{Your Team ID}” /> </filter> </link-entity> </link-entity> </entity> </fetch> For all the users Send an Email individually to the user OutputUser 1. Which is CRM Admin in my case in the team. User 2 Vidit Gholam system Administrator Hope that helps. !
Share Story :
Multi Select Option Set is not visible in Cloud flow Trigger Body
Problem Statement: I triggered a Cloud flow and expected to get the multi select option set value as part of triggered body. However, the trigger body does not show the field. I checked with Common Data Service(Current environment) and Common Data Service Connector as well. Solution: This is more of a workaround, we do not get the multi select option set field, so we will use Get a row action to get the record that was created.
Share Story :
Loop on Multi Select Option Set Values Using Cloud flow
Problem Statement: We wanted to run an action on all the selected values in a multi select option set(choice).We get the data in a comma separated string. Solution: 1.When we get the values in comma separated values, we will need to convert the string to an array format. Formula: array(split(Input comma separated data),’,’)) 2. Get the output from the compose step and add in parse Json to create a Json object. 3.Add an apply to each on Json body and you can use the item(apply_to_each) to access the data from the Json object. Conclusion: Instead of complicating the flow with switch or if condition to check the data and then run the flow, we can loop on Multi select option set value using apply to each action.
Share Story :
Post Message in MS Team when Code is Checked-in Azure DevOps TFS
If you want to keep track of the Commits of any Critical Project and want to discuss with your Project Team Member regarding commits made on TFS. We can create a flow that will post the Commit details of that Critical Project on your Project Channel. Step 1: Create a Team and a channel to post the Checked-in Details. Here I have created a Team with the name “Project Team” and a separate channel “Azure DevOps” to post all the messages related to Development and DevOps. Step 2: Create a Cloud flow to post Message when someone commits any changes in Azure DevOps (TFS) Search for Azure and select the triggering condition as “When code is checked in (TFVC)” Configure the Triggering block with Project for which you want to post a message to MS Team. If you want to track the commits of any specific user then you can set a user in Team Member otherwise it will post a message for all checked-in commits made by all Project Members present in Member. Now, we will add Post a message (v3) block in Cloud flow. Make sure that you should select the right channel while configuring the post message block, after configuring your block it should look like the below screenshot: Save the Cloud flow and Test it by making commits from your Visual Studio or Azure DevOps from the browser. Testing. Here, I will make commit using Visual Studio: Result
Share Story :
Send Email to not resolved Email Ids from Workflow/Cloud flows
Introduction: We might have a requirement to send emails from Workflow/cloud flows to Ids that cannot be resolved as Contacts, Accounts, Users in CRM. Solution: We need to make changes to system settings to allow messages to unresolved recipients In case of Workflow, directly add email address in the field( It will show ? as it is not resolved address) For Cloud flow, in create a new email record, click on “Switch to Input entire array”, populate the email in addressused field. This will let you send emails to an unresolved email address.
Share Story :
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 –