Power Automate Archives - Page 3 of 7 - - Page 3

Category Archives: Power Automate

Set multiple not resolved Email Ids as To Party CC Party & Bcc Party in D365 Email Message records using Cloud flows

Many a time it happens that we need to send emails that may be an email notification etc. to clients, with the power automate capabilities we can schedule, trigger, manually run, and do want not to automate these notification emails.  But the road blocker to all of these is not resolved email IDs, i.e. email IDs that cannot be resolved as Contacts, Accounts, Users in CRM.  We need to make changes to system settings to allow messages to these unresolved Id we have already covered this in the Blog : [https://www.cloudfronts.com/power-automate/send-email-to-not-resolved-email-ids-from-workflow-cloud-flows/]  In this blog let’s see how we can set multiple not resolved Email Ids as To Party CC Party & Bcc Party in D365 Email Message records using Cloud flows  ToParty, CCParty, BccParty are all Activity Parties and they have a ParticipationTypeMask integer value associated with them more on Activity Parties and Types in this link [https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/activityparty-entity?view=op-9-1]  ParticipationTypeMasks are as below :   Sender : 1   ToRecipient: 2  CCRecipient: 3   BccRecipient: 4  In Cloud flow create a new email record, click on “Switch to Input entire array”, populate the email in the address used field and ParticipationTypeMasks as shown below :    Hope this helps!   Thank you 

Share Story :

Get Option Set Labels in Power Automate flows

Every Option set Option has two Values associated with it :   Label Value –  which is a free text field.  Value – Which is an integer value as   In any Power Automate flow by default, we only get the integer value of an Option Set Option.  In this blog let’s see we can get a Label of an Option Set Option.  On my Accounts in CRM, I have an Option set Account Type.   I have used a Get row by ID Action to get the Account Record whose Account Type Label I need to get.  The next step is to check the Raw outputs of this Trigger Action and search for your Option Set field name.  You will see 2 values in the body of the Raw outputs as shown below.  Expression : outputs(‘Get_Account’)?[‘body/cfs_accounttype@OData.Community.Display.V1.FormattedValue‘]  Gives the Label: Business Combination.  Expression : outputs(‘Get_Account’)?[‘body/cfs_accounttype’]  Gives the Value: 224520002.  Inputs:   Output :   Hope this helps !   Thank you. 

Share Story :

Get year from Current date & Time function in Cloud Flows

We wanted to get the current year but there is no direct expression only to get the year. Below is the solution where we get the current year. Use formatDateTime function function with Utcnow(). Below is the expression we used. formatDateTime(utcNow(),’yyyy’) Output – Expression to get current date formatDateTime(utcNow(),’dd’) 2. Expression to get the current Month formatDateTime(utcNow(),’MM’) Hope this helps!

Share Story :

Creating Custom Connector for Shopify in Power Automate- Part 2

In Part 1, we created a Custom connector for Shopify and added One Action to retrieve customer data. In this blog we will add more Actions to our Shopify Connector. Actions: Create Customer Update Customer Retrieve all the products Create a new Action to create a new customer and repeat the steps as done in the previous blog(Part 1) 2. Add a request 3. Select the verb and Post request URL, to create a new customer in Shopify URL-: https://{apikey}:{password}@{hostname}/admin/api/2021-10/customers.json Example URL (For reference)- https://9ed959ec1ed8536c82689353bf247c78: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@sans-the-label-designer.myshopify.com/admin/api/2021-10/customers.json 4. In the Request area, choose body then Edit. 5. In the Parameter area, you now see all the parameters that the API expects to create a new customer. We will make the first name, last name, and email as required. Select ‘first_name’ click on more commands(…) and then click on edit. 6. Add a response Go to Response section and click on “Add default Response” NOTE-  you can add sample response from the Shopify API Documentation Customer (shopify.dev) 7. Paste the sample in “Body” and click on Import 8. Once all the actions are done, click on Update connector 9. Perform the below actions similarly like the above action- Update Customer: Create a new Action Enter Summary, Description, and Operation ID Summary: Update Customer Description: Update Customer in Shopify Operation Id: UpdateCustomer Go to Request and Click on “Import from sample” Select the verb and PUT the request URL to update customer in Shopify URL- https://{apikey}:{password}@{hostname}/admin/api/2021-10/customers.json Example URL(For reference)- https://9ed959ec1ed8536c82689353bf247c78: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@sans-the-label-designer.myshopify.com/admin/api/2021-10/customers/{customer_id}.json Add a response. Retrieve all Products Create new Action Enter Summary, Description, and Operation ID Summary: Retrieve All Products Description: Retrieve All Products Operation Id: RetrieveAllProducts Go to Request and Click on “Import from a sample” Select the verb and GET request URL to retrieve all the products. URL-https://{apikey}:{password}@{hostname}/admin/api/2021-10/customers.json Example URL (For reference)- https://9ed959ec1ed8536c82689353bf247c78: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@sans-the-label-designer.myshopify.com/admin/api/2021-10/products.json Add a response. 10. Using Custom Shopify connector in MS Flow. Go to Custom and select Shopify connector You can see all the actions Output-

Share Story :

Creating Custom Connector for Shopify in Power Automate- Part 1

In this blog we’ll learn how to create a custom connector for Shopify using Power Automate. Go to Apps and click on “Manage Private Apps” 2. Create on “Create private app” 3. Provide app name and email 4. Give permissions based upon your requirements No Access Read Access Read and write 5. Click on Save and then click on create new private app 6. After creating app, we get API key, password and URL Creating Custom Connector in Power Automate 7. Go to Power Automate->Click on Data->Custom Connectors 8. Click on “+ New custom connector” –> Create from blank. Give a name to your connector and click on “continue 1. General 9. You can upload an image, background color and description as you want or desire 2. Security 10. Select Authentication type as “Basic Authentication” and give label to the parameters. 3. Definition 11. In Definition, you can create Triggers and Actions based on your requirements. Click on “New Action” 12. Enter Summary, Description and Operation ID 13. Go to Request and Click on “Import from sample” 14. Enter the verb and Get request URL to retrieve the single customer detail Verb: GET, URL: https://{apikey}:{password}@{hostname}/admin/api/2020-10/customers/{customer_id}.json Example- https://9ed959ec1ed8536c82689353bf247c78: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@sans-the-label-designer.myshopify.com/admin/api/2021-10/customers/{customer_id}.json Here, {Customer_id} is the input parameter. A request would look like the one below- Add response 15. Go to Shopify API Documentation:  Customer (shopify.dev) and copy the JSON file and enter it in Add default response->body 16. Click on Create Custom Connector 4. Test 17. Add a new connection 18. Enter the API key and password 19 Create a new customer in Shopify app and enter the customer ID in GetCustomer 20. Click on “Test operation” to test your connector Hope this helps!!

Share Story :

Dynamically storing MS Forms Drop down field values into D365 CRM Option Set using Power Automate Flow

MS Forms offers a functionality to create a dropdown field which is similar to an option set fields in D365 CRM, But when it comes to mapping or storing values between these two field things become a bit tricky. However there are a few workaround using power automate capabilities. In this blog let’s see how we can store a MS Forms Dropdowns options into an Option Set field in CRM.  What is an Option Set? Option sets are a field type that can be created within Dynamics CRM and are Often referred to as “dropdown” or a “pick-list”.   An option set has two identities for each of its option. The Options Label Name and the Label Value as shown in the below snapshot.  What is a Dropdown in MS Form ? A dropdown is a list of defined options(Choice) that can be selected by a user, unlike a text field where the data can be “organic” or manually entered.  Now Let’s Consider an use case :  Consider we have a MS Form Name “Company Registrations” when a user submits this form a Power Automate flow is triggered which creates a new Account record in CRM with the field mapping shown in similar colors in the below snapshot.   Now we need to get the form responses first to create a new Account record.  2. All the Text field values can be directly mapped into the dataverse connector as shown in the below snapshot.  3. For mapping the MS forms Dropdown to the Option set we need to maintain the CRMs Option Label values into our flow as to set (define the value of the option set) Option Sets in CRM we need to pass the Label Values to the flow (if you just pass the label text it won’t work hence we need to maintain these option set values in the flow)as shown below.  4. Now we need to select the option set field in our flow connector and select enter custom value.  5. Once you are able to add a customer value use the following expression which will dynamically bring option set label value for the dropdown choice selected by the user on the form.Expression – outputs(‘Option_Set_Values’)?[outputs(‘Get_Form_Response’)?[‘body/rf98dd4fb83624fc7b7314de77542a3ef’]]Red : Text in the above expression corresponds to “Outputs “in the below snapshot which is the output of the compose in which we stored our option set label values. Blue : Text corresponds to the “Ownership Type” from the form response.   Output : MS Form Submission –   Created Account Output –   Hope this helps !  

Share Story :

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!!

Share Story :

Parallel Branching in Cloud Flow

At times, if there are some operations which your Flow wants to perform while it waits to get back, it’s best to use Parallel Branching in Flows. Here’s a quick tip on it! Scenario Some Flows need you to include Approvals or Adaptive Cards that halt the execution of the Flow until the Response from the target is sent back to the Flow. If there are some steps to be taken after the Response is received. Parallel Branching You can use Parallel Branching Select Parallel Branching instead of a normal Step. Now, all the Response dependent Actions should be in one of the Branches – (Denoted by Red Box and arrow). And the other part where the execution is expected to be carried forward should be in the other branch – (Denoted by Green Box and arrow) The execution will then wait where the parallel branches merge finally. Else, each branch can choose to end independently if there are no inter-dependent actions to be take, like taking Response from the Parallel Branch as well. The Waiting state will look like this – Now, when the Response is submitted back, the Flow execution will continue from the point of convergence of the two parallelly separated branches. With this, you can separate dependent activities by using Parallel Branching.

Share Story :

Understanding Primary Key notations in Dataverse connector in Power Automate

In case it’s your first time creating a Cloud Flow using Dataverse connector and dealing with Primary Key of the Activity Type of entity, here’s a quick tip to keep in mind. Normal Entity As a creator for Flow, let’s say you have listed Records of an entity called as Accounts (out-of-the-box), you’ll notice that the name of the entity Activity Entity Now, if you try to search for the Name of the Activity entity, it won’t appear as it does for other entities, instead just search “Unique” and you’ll find an entry for Unique identifier of the activity entity – Name of my Activity entity is ‘Snapshot’, but it doesn’t show up when I search Snapshot. So instead, just search “Unique” or “Identifier” On the contrary, out-of-the-box entities have their own names named as Primary Keys Hope this is useful!

Share Story :

Create attachments in SharePoint when email arrives

Use case – we wanted to retrieve attachment when new email arrives in outlook and create same file in SharePoint Let see how we can achieve this! Step 1 – Flow triggers on when a new email arrives trigger from Outlook connection. Step 2 – Retrieve attachments and Create file in SharePoint. Add step create file from SharePoint connection. In Create file, Add site address, Folder path, File name, File Content. Here file Content is the Attachment content from Trigger and File Name should be Attachment name. Save the flow and try. Hope this helps!

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange