how to create Power automate flow Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/tag/how-to-create-power-automate-flow/ Microsoft Dynamics CRM . Microsoft Power Platform Thu, 25 Apr 2024 09:34:49 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32&ssl=1 how to create Power automate flow Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/tag/how-to-create-power-automate-flow/ 32 32 176351444 Understanding Key Phrase Extraction in Power Automate for Text Analysis https://microsoftdynamics.in/2024/04/25/understanding-key-phrase-extraction-in-power-automate-for-text-analysis/ https://microsoftdynamics.in/2024/04/25/understanding-key-phrase-extraction-in-power-automate-for-text-analysis/#respond Thu, 25 Apr 2024 09:34:49 +0000 https://www.inogic.com/blog/?p=37953 The key phrase extraction model identifies the main topics in a text document. For example, if you have a sentence like “The movie was entertaining and the acting was impressive!”, the model would extract key phrases such as “movie”, “entertaining”, and “acting”. This model helps to identify and list important themes or subjects from unstructured...

The post Understanding Key Phrase Extraction in Power Automate for Text Analysis appeared first on Microsoft Dynamics 365 Blog.

]]>
The key phrase extraction model identifies the main topics in a text document. For example, if you have a sentence like “The movie was entertaining and the acting was impressive!”, the model would extract key phrases such as “movie”, “entertaining”, and “acting”. This model helps to identify and list important themes or subjects from unstructured text.

To utilize this prebuilt model within Power Automate, refer to the documentation titled “Using the Key Phrase Extraction Prebuilt Model in Power Automate” for detailed instructions and guidance on implementation.

Note: The format for data input is limited to a maximum of 5,120 characters per document when using the key phrase extraction prebuilt model.

Use Case: Extracting Key Phrases from Email for Meeting Preparation

Scenario:

You have sent an email to a client detailing your product features that can fulfill their requirements. Now, you want to automatically extract key phrases from that email and store them in a spreadsheet to prepare for an upcoming meeting or call with the client.

Solution Overview:

When the client responds to your email or when you manually trigger the process, Power Automate will retrieve the email content, extract key phrases using AI Builder’s Key Phrase Extraction model, and then update a spreadsheet with the extracted key phrases for easy reference during the scheduled meeting or call.

Let’s explore how we can implement this functionality using Power Automate.

To trigger the Power Automate flow when a new email message record is created in Microsoft Dynamics 365 CRM, set the change type to ‘added’, the table name to ’email message’, and configure the scope at the ‘organization’ level based on your specific needs.

Key Phrase Extraction in Power Automate for Text Analysis

Next, we’ll incorporate the Key Phrase Extraction prebuilt model in our flow to extract key phrases from the email. We’ll map the email message description to the text field of the Key Phrase model for analysis.

Key Phrase Extraction in Power Automate for Text Analysis

To store the extracted key phrases along with email details in an Excel sheet using the “Excel Online (Business)” connector, I’m creating a table with columns for Subject, Description, and Key Phrases.

Key Phrase Extraction in Power Automate for Text Analysis

Now that the table is set up, we’ll proceed to add it as the next action in our flow and map the fields accordingly to populate the Excel sheet with the email subject, description, and extracted key phrases.

Key Phrase Extraction in Power Automate for Text Analysis

Upon adding this action, Power Automate will automatically incorporate a “For Each” loop in the flow, which will iterate through each extracted key phrase from the email description. This loop ensures that the subsequent actions are applied to each key phrase individually. With this setup, our flow is now complete. Let’s save it and proceed to testing.

Key Phrase Extraction in Power Automate for Text Analysis

To test our flow, we’ve created an email activity record in Dynamics 365 CRM. Below is the record details and its description. This email contains points about the product features we plan to discuss with the client during an upcoming scheduled meeting, focusing on fulfilling the client’s requirements.

Key Phrase Extraction in Power Automate for Text Analysis

Once we create the email, it will trigger our flow to extract key phrases from its description and add them to our Excel table. This automated process helps organize and capture important topics discussed in the email for further analysis or action.

Key Phrase Extraction in Power Automate for Text Analysis

Conclusion

We’ve successfully implemented an automated workflow using Power Automate and Dynamics 365 CRM to extract key phrases from email descriptions and store them in an Excel table. This streamlined process allows us to efficiently capture and analyze important topics discussed in client communications, enabling better preparation and organization for client meetings and engagements.

Model Driven App

The post Understanding Key Phrase Extraction in Power Automate for Text Analysis first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Understanding Key Phrase Extraction in Power Automate for Text Analysis appeared first on Microsoft Dynamics 365 Blog.

]]>
https://microsoftdynamics.in/2024/04/25/understanding-key-phrase-extraction-in-power-automate-for-text-analysis/feed/ 0 4873
Utilize the Power of Prebuilt Business Card Reader Model in Microsoft Power Automate https://microsoftdynamics.in/2024/04/09/utilize-the-power-of-prebuilt-business-card-reader-model-in-microsoft-power-automate/ Tue, 09 Apr 2024 07:29:01 +0000 https://www.inogic.com/blog/?p=37774 AI Builder in Microsoft Power Automate makes tasks easier for everyone. It lets you use prebuilt AI models to understand forms, recognize things in pictures, sort out text, make guesses, and understand people’s feelings from what they write. It’s like having a smart assistant that does tough jobs for you. So, even if you’re not...

The post Utilize the Power of Prebuilt Business Card Reader Model in Microsoft Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
AI Builder in Microsoft Power Automate makes tasks easier for everyone. It lets you use prebuilt AI models to understand forms, recognize things in pictures, sort out text, make guesses, and understand people’s feelings from what they write. It’s like having a smart assistant that does tough jobs for you. So, even if you’re not a tech pro, you can still use AI to get your work done faster and simpler.

Utilize the prebuilt business card model to extract details from images of business cards. Upon detecting a business card in the image, the AI model automatically extracts key information, including the individual’s name, email, address, company, job title, and contact numbers. Once extracted, this data can be used efficiently for various purposes, streamlining processes and eliminating manual data entry tasks.

Note: Currently, the prebuilt business card reader supports extraction in English and Japanese languages exclusively.

Additionally, images must be in JPG, PNG, BMP, or PDF format. Furthermore, the size of the image file should not exceed 50 MB. By ensuring that your images meet these requirements, you can effectively utilize the business card model for accurate data extraction.

Using Business Cards to Extract Data

To create a flow that utilizes the business card reader with a basic example, we’ll set up a manual trigger and include an action to upload a sample card file. Then, we’ll check if it can successfully create a contact record in our Dynamics 365 CRM.

First, let’s set up the flow:

  1. Manual Trigger: Start by adding a trigger that is manually initiated. This will allow you to trigger the flow whenever you’re ready to upload the sample card file.
  2. Upload File: Add an action to upload the image file. You can use a suitable action depending on where your file is stored, such as “Get file content” if it’s stored in a cloud storage service like OneDrive or SharePoint.
  3. Business Card Reader: Next, add an action to use the business card reader model. Choose the appropriate action provided by AI Builder for extracting information from the uploaded image.
  4. Create a Record in Dynamics 365 CRM: Finally, add an action to create a contact record in your Dynamics 365 CRM. Map the extracted information from the business card reader action to the corresponding fields in the contact record.
  5. Save and Test: Once you’ve set up the flow, save it and give it a name. Then, manually trigger the flow and upload the sample card file. Check if the flow successfully extracts the information and creates a contact record in your Dynamics 365 CRM.

Business Card Reader Model in Microsoft Power Automate

To integrate the extraction of information from a business card into your flow, simply search for the “Extract information from business card” action in the actions list and add it after triggering your flow.

Business Card Reader Model in Microsoft Power Automate

By keeping the file type detection set to automatic, the action will efficiently process the uploaded card file. Ensure to specify the uploaded card file in the “Business card” field, typically sourced from the previous action where the file was uploaded.

Business Card Reader Model in Microsoft Power Automate

It’s advisable to implement validations before creating a record in your Dynamics 365 CRM, especially considering scenarios where the AI might not detect all the required data. In the screenshot provided, we will validate the last name data from the card, recognizing it as a mandatory field for creating a contact record. This precautionary step ensures that essential information is present before proceeding with record creation, reducing the risk of incomplete or inaccurate record creation in your Dynamics 365 CRM system.

Business Card Reader Model in Microsoft Power Automate

Next, connect all the field values you wish to fill after the AI model detects them. This includes name, contact details, email, job title, company name, and address details.

Business Card Reader Model in Microsoft Power Automate

Now that the flow is complete, we can test it by manually uploading an image file in the Card Input field, as shown in the below screenshot.

Business Card Reader Model in Microsoft Power Automate

Although it may take some time for the AI model to detect and extract data from the uploaded file, the process ultimately saves a significant amount of time compared to manual entry.

Business Card Reader Model in Microsoft Power Automate

Conclusion

We have successfully created a Microsoft Power Automate flow to extract information from a business card and generate a contact record from it. This efficient process not only saves time but also allows end-users to focus on more critical tasks. Importantly, creating this flow doesn’t require the user to be a technical expert, showcasing the accessibility and user-friendly nature of Power Automate. With this automated workflow, tedious manual data entry tasks are minimized, enabling users to allocate their time and resources more effectively.

Mailchimp integration with Microsoft Dynamics 365 CRM – Revamp sales and marketing strategies!

The post Utilize the Power of Prebuilt Business Card Reader Model in Microsoft Power Automate first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Utilize the Power of Prebuilt Business Card Reader Model in Microsoft Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
4871
How to configure a trigger to handle both GET and POST requests effectively using Power Automate https://microsoftdynamics.in/2024/02/23/how-to-configure-a-trigger-to-handle-both-get-and-post-requests-effectively-using-power-automate/ Fri, 23 Feb 2024 10:25:29 +0000 https://www.inogic.com/blog/?p=37452 I recently encountered a client requirement that necessitated handling both “GET” and “POST” HTTP requests. While Azure Function offers a straightforward solution for such scenarios, the concern was it should be handled within Dynamics CRM. Faced with these constraints, I explored alternatives that would allow us to meet the client’s needs within the preferred environment....

The post How to configure a trigger to handle both GET and POST requests effectively using Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
I recently encountered a client requirement that necessitated handling both “GET” and “POST” HTTP requests. While Azure Function offers a straightforward solution for such scenarios, the concern was it should be handled within Dynamics CRM. Faced with these constraints, I explored alternatives that would allow us to meet the client’s needs within the preferred environment. Accommodating both “GET” and “POST” methods posed a unique challenge for our project.

I needed one URL that would trigger on “GET” and “POST” methods. Only one time it will trigger the “GET” method to validate logic and after that, it will call for the “POST” method to process some response. Below is the approach that allowed us to fulfill the client’s requirements seamlessly.

1. Create a solution in https://make.powerapps.com/where you have to add your Power Automate (Ms Flow)

Power Automate

2. In the solution click on the “New” button & select Flow as shown in the below image. It will redirect you to the Power Automate (MS Flow) window as shown in the following image.

Power Automate

Power Automate

3. Now we have to Search for the “When an HTTP request is received” Trigger point in our newly created Flow & from the search result select “When an HTTP request is received” and select “Who can trigger the flow” from the dropdown as per your requirement configure “Who can trigger the flow” based on your needs. Set the method as “GET” and give your flow a name. Finally, click on “Save” to obtain the “HTTP POST URL”.

Power Automate

4. Once saved, you’ll receive an HTTP POST URL, as illustrated in the image below. Now I am using this URL as the endpoint. This ensures that whenever it is triggered, your flow will also be triggered, regardless of whether the request is a “GET” or “POST“.

Power Automate

5. Next, add the “Initialize Variable” action to create variables. It will store the data coming into the Body.

Power Automate

6. When the “GET” method is called then Body will be blank, we will get a result from query string parameters however in the “POST” method response will come in Body. So, to handle both scenarios I have added the condition to check If Data is null then it should move further and take query string parameters and return them in the response as well as update that Power Automate from the “GET” method to “POST” else it will direct return the response.

Power Automate

Power Automate

Power Automate

Whenever any Power Automate gets created those are stored in the “workflow” entity. So, I tried to find my Power Automate using ODATA and I got its ID, name, and other details. It stores all Power Automate steps in one field “clientdata” in JSON format. So, to update from “GET” to “POST” we need to follow the below steps.

Power Automate

Now in Power Automate, we specified the table (entity) name as “Processes” which is the display name of the “Workflow” entity, and entered the ID of our flow in the “Row ID” field. we also need to retrieve the method stored in the “clientdata” attribute column. Therefore, select “clientdata” in the “Select columns” option. Also, set the variable “RecordData” using the “Body” output of the “Get row by ID” action.

Power Automate

7. Following this, use the “Compose” action, where the input will be modified by substituting “GET” with “POST” in the aforementioned JSON.

Power Automate

8. The subsequent step involves parsing the JSON, which means converting the JSON string into an object format. It’s essential to input the correct schema, as illustrated in the image provided.

Power Automate

9. The final step involves updating the previously retrieved process record. Modify the “clientdata” column to reflect the updated “clientdata”, wherein the method has been changed to “POST“.

Power Automate

10. After the record is updated, the modified JSON will resemble the image below.

Power Automate

Conclusion

In conclusion, the method outlined above demonstrates how you can dynamically alter the flow’s method from “GET” to “POST”. This is particularly useful when there’s a requirement for your flow to be triggered once using the “GET” method and subsequently, for all future triggers, to operate using the “POST” method.

The post How to configure a trigger to handle both GET and POST requests effectively using Power Automate first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post How to configure a trigger to handle both GET and POST requests effectively using Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
4856
How to invoke Low-code plug-ins using Power Automate Cloud Flow https://microsoftdynamics.in/2024/02/19/how-to-invoke-low-code-plug-ins-using-power-automate-cloud-flow/ Mon, 19 Feb 2024 09:27:41 +0000 https://www.inogic.com/blog/?p=37407 In the previous blog post, we talked about low-code plugins using the Dataverse Accelerator App where we created an instant plug-in to calculate Billing Details. In this blog, we will be integrating the same Instant Plug-in in the Microsoft PowerAutomate Flow. How to invoke Instant Plug-in in the Microsoft PowerAutomate Flow? 1. Log into your...

The post How to invoke Low-code plug-ins using Power Automate Cloud Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
In the previous blog post, we talked about low-code plugins using the Dataverse Accelerator App where we created an instant plug-in to calculate Billing Details. In this blog, we will be integrating the same Instant Plug-in in the Microsoft PowerAutomate Flow.

How to invoke Instant Plug-in in the Microsoft PowerAutomate Flow?

1. Log into your Power Apps Maker Portal > select the environment > from the left side panel > click on Flows > from the top menu > click on New Flow option > and then Select Instant cloud flow

Power Automate Cloud Flow

2. After clicking on Instant Cloud Flow, a pop window will occur. Referring to the below image, Provide a name for your flow and choose one of the actions from the dropdown to trigger the flow. Then click on the Create button.

Power Automate Cloud Flow

3. In a previous blog, we created a plug-in related to Billing Details that accepts three input parameters i.e. NoOFUsers means the count of Users, SubscriptionPrice relates to the cost of service provided to the User and Duration means how long the services are needed. Here, Click on ‘Manually trigger a flow ’ to add input parameters.

Power Automate Cloud Flow

4. Click on Next step and select Perform an unbound action from the action list it will redirect to you on Perform un unbound action card.

Power Automate Cloud Flow

5. Select the respective action from the Action Name dropdown and fill in the input parameters as per the selected action.

Power Automate Cloud Flow

6. After providing input parameters, you have to consume the action result. For this, the Compose and operation step assign the output parameter of action to the input field of the composing step as shown in the screenshot below:

Power Automate Cloud Flow

7. After making the above changes click on Save > Click on the Test button to run the created flow > Select Manually option and click on Test button > Fill input parameters and click on Run Flow it will run the resprective flow and give the exact output.

Power Automate Cloud Flow

8. Flow will run successfully. Check out the output below:

Power Automate Cloud Flow

Conclusion

Low code plugin we can use in a reusable manner. We can call or invoke plugins from Power Automate Flow in a default manner.

Microsoft Power Platform

The post How to invoke Low-code plug-ins using Power Automate Cloud Flow first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post How to invoke Low-code plug-ins using Power Automate Cloud Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
4849
Building and Editing Power Automate Flows with Copilot’s Help https://microsoftdynamics.in/2024/02/06/building-and-editing-power-automate-flows-with-copilots-help/ Tue, 06 Feb 2024 11:39:47 +0000 https://www.inogic.com/blog/?p=37297 If you’ve already experienced creating a Power Page with Copilot, great! If not, click here to get started. This blog will now explore how Copilot collaborates with Power Automate and outline the necessary configurations or settings to enable Copilot in your environment. In our daily routines, automation has emerged as an essential component, offering time...

The post Building and Editing Power Automate Flows with Copilot’s Help appeared first on Microsoft Dynamics 365 Blog.

]]>
If you’ve already experienced creating a Power Page with Copilot, great! If not, click here to get started. This blog will now explore how Copilot collaborates with Power Automate and outline the necessary configurations or settings to enable Copilot in your environment.

In our daily routines, automation has emerged as an essential component, offering time savings and process optimization. Microsoft Power Automate stands out as a potent tool, democratizing automation for users of all levels. This blog delves into the utilization of Copilot, an integral feature of Power Automate, demonstrating how it facilitates the seamless creation of automation flows, especially for those who are new to the field.

Activate Copilot and Generative AI functionalities

To activate Copilot in your environment, navigate to the Power Platform administrator portal, access the designated environment, and within the Generative AI feature, enable the “Move data across the region” option. Save the changes to apply the configuration. Microsoft Power Platform and Microsoft Dynamics 365 offer Copilots and generative AI features that assist in building apps, flows, chatbots, data analysis, summarization, message responses, idea generation, and more.

Power Automate Flows with Copilot

Note: Regional Variations in Advanced Features and Data Movement

It’s important to note that these advanced features may not be universally accessible across all regions and languages. Depending on your environment’s hosting location, enabling data movement across regions becomes essential to leveraging these capabilities. In regions such as Australia, the United Kingdom, and the United States, no additional action is required, as data movement across regions is not applicable in these cases.

Power Automate Flows with Copilot

Begin Your Journey with Copilot in Power Automate Cloud Flows

To begin utilizing Copilot in Power Automate, initiate the process by selecting the ‘Describe to design it’ option.

Power Automate Flows with Copilot

Here, you can articulate the details of your desired flow within the provided prompt, and Copilot will subsequently generate a suggested flow based on your description.

Power Automate Flows with Copilot

After receiving the suggested AI-generated flow, take a moment to review it. If you find that it aligns with your requirements, proceed with the suggested flow. However, if you feel adjustments are needed, you have the option to either rephrase your description or provide specific instructions and try the process again.

Power Automate Flows with Copilot

The final step before creating a flow involves ensuring that all your data sources are connected. If you’re working with Outlook or Teams, you can establish the connection directly from this window if it’s not already set up. Once you’ve confirmed the connections, proceed by clicking the “Create Flow” button to move forward with the flow creation process.

Power Automate Flows with Copilot

Refine Your Flow with the Assistance of Your Copilot

After activating the “Move data across regions” option in the Power Platform Admin Center, you’ll observe the presence of the Copilot button in the newly created automated flow. It’s crucial to note that there may be invalid parameters within the flow post-creation, requiring your attention. Copilot will assist you in rectifying these issues, offering step-by-step guidance to ensure your flow is ready for testing or execution. Furthermore, you have the option to use Copilot for editing your parameter fields, as demonstrated in the screenshot below.

Power Automate Flows with Copilot

Power Automate Flows with Copilot

Save and Perform Testing with Copilot

Once you’ve successfully addressed any invalid parameters, the “Save the flow” button will become visible, positioned just above Copilot’s prompt. After saving the flow, you’ll then notice the appearance of the “Test this flow” button, allowing you to initiate testing and ensure the seamless functionality of your automated process.

Power Automate Flows with Copilot

Power Automate Flows with Copilot

Conclusion

In conclusion, with the dynamic duo of Microsoft Power Automate and Copilot, automation becomes accessible and efficient for users of all levels. From effortless flow creation to handling parameters, Copilot streamlines the process, making Power Automate a user-friendly powerhouse for enhanced productivity. Embrace the simplicity of automation and empower your workflows with this innovative pairing.

copilot

The post Building and Editing Power Automate Flows with Copilot’s Help first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Building and Editing Power Automate Flows with Copilot’s Help appeared first on Microsoft Dynamics 365 Blog.

]]>
4846
Exploring AI Prompts within Power Automate https://microsoftdynamics.in/2024/01/08/exploring-ai-prompts-within-power-automate/ Mon, 08 Jan 2024 06:18:50 +0000 https://www.inogic.com/blog/?p=36983 As generative AI builder tools are becoming more and more popular, it is worth learning and using them to get the most out of them. One of the exciting features among AI builder tools is “AI Prompts” which are now generally available. AI prompts are used as a guide for AI models to generate the...

The post Exploring AI Prompts within Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
As generative AI builder tools are becoming more and more popular, it is worth learning and using them to get the most out of them. One of the exciting features among AI builder tools is “AI Prompts” which are now generally available. AI prompts are used as a guide for AI models to generate the output.

If you compare AI prompts to the early days of search engines correct “Keywords” is the key to search precisely. If you put correct keywords while searching then you will get more accurate results based on entered keywords, the more your keywords are precise higher the chances that you will get the exact result based on keyword search.

This same art goes with AI prompts as well, the more you spend time creating an accurate AI prompt with precise instructions higher the chances that the corresponding AI model will generate the specific output more accurately.

Creating the right prompt for a specific task is an art and essential for GPT to perform the instructed tasks more accurately. To create custom prompts efficiently, refer to this Microsoft doc.

In this blog, we will explore one of the existing AI prompts. how we can use that existing prompt in integration with Power Automate, and validate its results.

Let’s begin…!

From the Maker Portal  https://make.powerapps.com/, you can navigate to AI prompts, as part of the new AI Hub you will now have access to AI Prompts builder. There are 3 tabs available for navigation within “AI Prompts”:

  1. My Prompts- If you create any custom prompt as per your need it will appear here.
  2. Shared with me- If any other user shares the prompt with you then it will appear here.
  3. All prompts- All the prompts that are present in the system will appear here.

For this blog demonstration, let us select “All prompts”, explore pre-built/existing prompts available, and learn how to integrate them with other Power Platform components.

Exploring AI Prompts within Power Automate

NOTE: If you are not able to see “AI Prompts” in the left navigation pane of Power Apps then click on “Discover” and search for the same and pin it for quick navigation. You can refer to this blog to discover all your power apps that are not pinned in the first place.

You can look for existing prompts in the “All Prompts” tab as shown below:

Exploring AI Prompts within Power Automate

In this blog demonstration, let us use the “AI Sentiment” prompt in Power Automate and see the result, before that you can quickly open the prompt body and can quickly test the prompt with some inputs/sample values. And once you are happy with the testing you can use this prompt in the Power Automate.

Exploring AI Prompts within Power Automate

I have added sample data for testing as: “I am satisfied with your service”

Click on “Test prompt” and you will find the corresponding “AI Response” generated as shown below:

Exploring AI Prompts within Power Automate

Use Case: Need a Power Automate that takes input from customers by any means like email or survey response, validates that text through AI prompt and as an output, it should validate the input text whether sentiment is positive, negative, or neutral.

Power Automate Steps:

For simplicity let us select the “Manually Trigger a flow” trigger and pass text as input.

Then add an action from the AI Builder connector named “Create text with GPT using a prompt (Preview)” as shown below:

Exploring AI Prompts within Power Automate

NOTE: There was Create text with GPT connector available prior, which is deprecated now and replaced with this new connector Create text using a prompt where you have to select the prompt.

Under this action now select the name of the prompt from the dropdown menu, I selected “AI Sentiment”

Exploring AI Prompts within Power Automate

Now select the Input Text from the Dynamic content list from the previous step

Exploring AI Prompts within Power Automate

Once you save the Flow you will see the warning appearing at the top

Exploring AI Prompts within Power Automate

NOTE: The warning above prompted to add approval action before the GPT model output is passed to the next step. Optionally you can add Approval action this is not a mandatory step but it’s good to have a reviewing step where a human intervention can be included as a quick review to validate the output generated by the GPT model. To add the Approval step, you can refer to the Microsoft doc where detailed steps are mentioned.

For now, I am skipping the Approval process and letting us straight away send the GPT model output as is (without human review) to the Outlook email body as explained below.

The output generated from the previous step Create text with GPT using a prompt can be passed to the next step as an output parameter, it generates a flow variable called Text, which represents the output of your prompt generated by the GPT model. I am passing that output in the email body

Exploring AI Prompts within Power Automate

Once done save the Flow and this is how it will look like:

Exploring AI Prompts within Power Automate

Run the Flow manually and provide the input as below and click on “Run flow”:

Exploring AI Prompts within Power Automate

Upon clicking on “Run Flow” an email should be received with the generated AI response as shown below:

Exploring AI Prompts within Power Automate

Conclusion

With AI Prompts, you can tailor Generative AI capabilities as per your organization’s business needs and achieve greater productivity when integrated into Power Automate.

Microsoft Power Platform

The post Exploring AI Prompts within Power Automate first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Exploring AI Prompts within Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
4832
Exploring Cross-Environment Connectivity with the Microsoft Dataverse Connector https://microsoftdynamics.in/2023/11/10/exploring-cross-environment-connectivity-with-the-microsoft-dataverse-connector/ Fri, 10 Nov 2023 05:43:37 +0000 https://www.inogic.com/blog/?p=36456 We know that Power Automate allows us to execute a variety of tasks by connecting our present environment to the platform through the Microsoft Dataverse connector. This connector establishes a link between our current environment and Power Automate, enabling us to automate various tasks within our existing environment. While we can efficiently carry out tasks...

The post Exploring Cross-Environment Connectivity with the Microsoft Dataverse Connector appeared first on Microsoft Dynamics 365 Blog.

]]>
We know that Power Automate allows us to execute a variety of tasks by connecting our present environment to the platform through the Microsoft Dataverse connector. This connector establishes a link between our current environment and Power Automate, enabling us to automate various tasks within our existing environment.

Microsoft Dataverse Connector

While we can efficiently carry out tasks within our current environment using Power Automate flows, there might be situations where we need to perform operations in an environment different from the current one.

In a recent update, Microsoft unveiled a new action within the Microsoft Dataverse Connector, simplifying the process of connecting to and executing operations in various environments.

Using these actions, we can access records, as well as add, update, and delete records in various interconnected environments. Additionally, we can execute both bound and unbound actions within the alternative environment.

Our clients have specific needs where they need to carry out operations in their Production environment that correspond to the actions performed in the UAT environment. Essentially, when any account record is added in the UAT environment, a corresponding copy of that account record should be created in the Production environment, following the actions taken in UAT as a reference.

Here’s an example illustrating how we can establish connections to different environments and execute operations based on the current environment. In this scenario, whenever an account record is created in the present environment, we will simultaneously create an identical copy of the record in the other environment.

To accomplish this, we will set up a Power Automate flow as depicted below:

1) Here we have added a step to trigger this PowerAutomate flow when any account record is added to the current environment.

Microsoft Dataverse Connector

2) Now we will connect the other environment to perform the operations. To connect to other environments, select the Microsoft Dataverse connector.

Microsoft Dataverse Connector

3) Upon selecting the connector, you’ll encounter a variety of actions available for carrying out different tasks in alternate environments. Since we want to create a record in the connected environment, we’ve opted for the “Add a new row to the selected environment” action.

Microsoft Dataverse Connector

 

4) Once you’ve chosen the action, you will have the option to access the Environment dropdown, enabling you to pick the specific environment you wish to establish a connection with.

Microsoft Dataverse Connector

5) As we want to create a duplicate account record we will select the Account table and set the Account Name value which was created in our current environment to create a record with the same name.

Microsoft Dataverse Connector

 

This Power Automate flow will initiate its execution when a new account record is added to the current environment. It will then proceed to duplicate this record in another connected environment.

Not only do we can add rows, but the Microsoft Dataverse connector allows us to perform various operations by establishing connections with different environments.

Microsoft Dataverse Connector

Performing bound and unbound actions, Updating and deleting rows, and uploading, and downloading files in different environments can be possible with this recent update of the Microsoft Dataverse connector.

Conclusion

In summary, this blog detailed the process of connecting diverse environments within a Power Automate flow to our current workspace and demonstrated how we can execute a range of actions in different environments through the Microsoft Dataverse connector.

The post Exploring Cross-Environment Connectivity with the Microsoft Dataverse Connector first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Exploring Cross-Environment Connectivity with the Microsoft Dataverse Connector appeared first on Microsoft Dynamics 365 Blog.

]]>
4808
How to use the dateDifference() function in Power Automate https://microsoftdynamics.in/2023/09/07/how-to-use-the-datedifference-function-in-power-automate/ Thu, 07 Sep 2023 10:37:09 +0000 https://www.inogic.com/blog/?p=35932 Power Automate has recently introduced an innovative function aimed at calculating the difference between two dates. However, finding the difference between two dates in Power Automate was quite complex, and with the recent introduction of dateDifference() function, Microsoft has eased that out. In this blog, we will see how the process of calculating the difference...

The post How to use the dateDifference() function in Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
Power Automate has recently introduced an innovative function aimed at calculating the difference between two dates. However, finding the difference between two dates in Power Automate was quite complex, and with the recent introduction of dateDifference() function, Microsoft has eased that out.

In this blog, we will see how the process of calculating the difference between two dates has been simplified compared to the complex logic of using ticks() function.

Scenario:

Let’s see the scenario of calculating the days remaining for a subscription to expire from today’s date. In many organizations, it’s very important to remain aware of when various licenses are about to expire. The ability to accurately determine the remaining days until a license subscription concludes holds high importance.

Traditionally, this task could be achieved using the ticks() function, which seemed complex compared to the dateDifference() function. By leveraging the dateDifference() function, individuals can effortlessly compute the exact number of days left until a license subscription reaches its termination date. I have created a power automate flow for the creation of Account entity records. Also, I have fields for Start Date and End Date of a License, and also a whole number field for Expiry days field to display the remaining days until the license expires.

Below are the steps for the power automate flow.

  • Creation of Account.

Power Automate

  • Add an action “Update a row” to show the remaining expiration days.

Power Automate

  • Adding the datedifference() function in the Expiry days field.

Power Automate

Expression –

dateDifference(formatDateTime(utcNow(),’yyyy-MM-dd’), formatDateTime(triggerOutputs()?[‘body/cr9a6_enddate’],’yyyy-MM-dd’))

Here is the output of the remaining days for the expiration of the license as per the current date, i.e., 25th August, 2023.

Power Automate

The output is in {days}.{hours}:{minutes}:{seconds} format.

Microsoft Power Platform

Now if we want to show the difference only in days, we can use the split() function to get only days, as can be seen below.

Power Automate

Expression: split(dateDifference(formatDateTime(utcNow(),’yyyy-MM-dd’),formatDateTime(triggerOutputs()?[‘body/cr9a6_enddate’],’yyyy-MM-dd’)),’.’)[0]

Here we get the only days remaining for the expiration of the license by extracting the hours, mins, secs.

Power Automate

Conclusion

In this blog, we explored the dateDifference() function and saw how it simplifies the complex logic for calculating the difference between the two dates.

The post How to use the dateDifference() function in Power Automate first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post How to use the dateDifference() function in Power Automate appeared first on Microsoft Dynamics 365 Blog.

]]>
4795
How to use Power Automate Flow in Power Pages https://microsoftdynamics.in/2023/07/07/how-to-use-power-automate-flow-in-power-pages/ Fri, 07 Jul 2023 09:31:30 +0000 https://www.inogic.com/blog/?p=35337 Introduction In this blog, we are going to use Power Automate Flow through Power Pages to achieve business requirements. Using Power Automate saves lots of time and is easy to use. Let’s Jump into the scenario where we are going to create a record of a custom entity named “Policy” which is related to contact...

The post How to use Power Automate Flow in Power Pages appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction

In this blog, we are going to use Power Automate Flow through Power Pages to achieve business requirements. Using Power Automate saves lots of time and is easy to use.

Let’s Jump into the scenario where we are going to create a record of a custom entity named “Policy” which is related to contact through an N:1 relationship. Policy entity consists of Start Date, End Date, Name, and Contact fields. In Start Date, today’s date will be set, and based on how many years the user has taken the policy the End Date will get set.

To create a site using Power Page with the template of your choice, kindly access the following link. For this demonstration, we have configured a public portal that will be accessible to all. You can customize the site according to your business needs, also, you can set the privacy settings as desired. We designed our site as shown in the below image where the First Name, Last Name of the contacts are displayed. There is an input field where users can specify the purpose for taking the policy in the read-only grid and there also are two buttons that allow users to proceed with the policy according to their preferences.

Power Pages

Step 1 – Create a solution from Power Pages -> New -> Automation -> Instant Power Automate flow -> Skip -> Power Pages Connector -> Select When Power Pages call a flow trigger.

Then enter some input variables as shown in the below screenshot

Power Pages

Step 2 – Add a new step -> Choose Microsoft Dataverse Connector -> Add a new row -> Select Policies entity.

And then add the below formulas for the respective fields and save it.

Microsoft Power Platform

End Date: addToTime(utcNow(),int(triggerBody()[‘text_2′]),’Year’)

Start Date: utcNow()

Power Pages

Step 3 – Navigate to Home from Power Pages and then edit the respective Site from the list of Active Sites using the Edit button. Then click on Set Up and Cloud Flows. Then using the Add button add the respective Cloud flows to your respective site.  Select and edit the respective flow, from where you can Add respective Roles and the flow shall run only for the user with the selected role.

Power Pages

Power Pages

Note: Copy and store the URL as it will be used later in the code.

Step 6 – Navigate to the pages -> Added new Page -> Start from blank -> Edit with visual studio code.

Power Pages

Power Pages

Replace the HTML code with the below code. In the below code, we are fetching the contact record. On click of those buttons, we called a function named “CreateRecord()” which is taking parameters contactid and year respectively. When a user clicks on the desired button which is “1 Year” or “3 Year we have passed the number of years respectively i.e., “1” for a one-year policy and “3” for a three-year policy.

Inside the function, we created a data JSON and passed it in the post request for Power Automate Flow which will create the policy record. In the code, we have added the URL which we got in Step 4.

div class="sectionBlockLayout text-left"> {% fetchxml contact %} <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" returntotalrecordcount="true"> <entity name="contact"> <attribute name="firstname" /> <attribute name="lastname" /> <attribute name="contactid" /> <order attribute='firstname' descending='false' /> <filter type="and"> <condition attribute="firstname" operator="not-null" /> </filter> </entity> </fetch> {% endfetchxml %} {% if contact.results.total_record_count > 0 %} <div style="width:100%"> <table class="styled-table"> <th>First Name</th> <th>Last Name</th> <th>Taking Policy For</th> <th>Get Policy</th> {% for contactRecord in contact.results.entities %} <tr> <td>{{contactRecord.firstname}}</td> <td>{{contactRecord.lastname}}</td> <td><input type="text" required id="{{contactRecord.contactid}}" placeholder="Enter Your Input" /></td> <td> <button onclick="CreateRecord('{{contactRecord.contactid}}','1')">1 Year</button> <button onclick="CreateRecord('{{contactRecord.contactid}}','3')">3 Year</button> </td> </tr> {% endfor %} </table> {% else %} <h2>No records found.</h2> {% endif %} <script> function CreateRecord(contactid, year) { var policyfor = document.getElementById(contactid).value; var _url = "https://softwarecares.powerappsportals.com/_api/cloudflow/v1.0/trigger/ed758f6e-fdff-46f1-bd60-fab3df53711b";  //add the URL you got while adding the flow var data = {}; data["Policy For"] = policyfor; data["Contact Id"] = contactid; data["Year"] = year; var payload = {}; payload.eventData = JSON.stringify(data); shell .ajaxSafePost({ type: "POST", contentType: "application/json", url: _url, data: JSON.stringify(payload), processData: false, global: false, }) .done(function (response) { console.log(response); }) .fail(function (error) { console.log("failed" + error); }); } </script> </div> </div>

Now visit the site where you can see the below pop-up click on sync and the changes we have made in the code will get synchronized.

Power Pages

After that, you can see the  “No records found” on the web page. But when you will open it in the preview you can see the records as shown in step 1.

Power Pages

Power Pages

After clicking the policy button our flow will be called and the policy record will get created based on how many years the user is taking the policy for.

Power Pages

Conclusion

Thus, we learned how to create a record through Power Automate Flow when we want to create a record using Power Pages with some calculated values and logic.

The post How to use Power Automate Flow in Power Pages first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post How to use Power Automate Flow in Power Pages appeared first on Microsoft Dynamics 365 Blog.

]]>
4775
Send Automatic Follow-Up email in Microsoft Dynamics 365 CRM using Power Automate Flow https://microsoftdynamics.in/2023/04/20/send-automatic-follow-up-email-in-microsoft-dynamics-365-crm-using-power-automate-flow/ Thu, 20 Apr 2023 09:10:43 +0000 https://www.inogic.com/blog/?p=34506 Sen Automatic a follow-up email that should be trailing mail for the previous email after 2 days of New Opportunity.

So, to fulfill this requirement, we have used Power Automate Flow to create an email to be sent as a Follow up trailing email in Microsoft Dynamics 365 CRM.

The post Send Automatic Follow-Up email in Microsoft Dynamics 365 CRM using Power Automate Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
Sen Automatic a follow-up email that should be trailing mail for the previous email after 2 days of New Opportunity.

So, to fulfill this requirement, we have used Power Automate Flow to create an email to be sent as a Follow up trailing email in Microsoft Dynamics 365 CRM.

In this blog, we will walk through the steps for sending a trailing follow-up email after 2 days of Opportunity Creation to the respective Customer.

Step 1: When Opportunity is created we will be sending an initial Email to the Customer and after 2 days there will be a trailing follow-up email sent to them. Let us start with developing a Power Automate flow in Microsoft Dynamics 365 CRM.

Now navigate to https://make.powerapps.com environment and Create a solution for Power Automate Flow.

Step 2: Create a new Automated Flow with triggering action as “Row is Added, Modified or Deleted” as shown in the below screenshot.

Power Automate Flow

We will select Change Type as Added and Table Name as Opportunities for our requirement. Check in the screenshot below.

Power Automate Flow

Step 3: On creation of Opportunity will first send an initial mail to the customer (i.e. Account) of the Opportunity, so add a step to create an Email Message by selecting Add a row step and selecting Email Messages entity with the below details of the email.

Microsoft Power Platform

  • From: Created By of the Opportunity
  • To: Account of the Opportunity
  • Subject: Add a subject based on your requirement
  • Description: Add an email content message
  • Regarding: Set Opportunity reference so that the email conversation will be respected to Opportunity and available in the Timeline of Opportunity record in Microsoft Dynamics 365 CRM

Please refer the screenshot below for reference emails created in the power automate flow step.

Power Automate Flow

Step 4: Once the email is created will add a “Send Email” bound action step in Power Automate flow which will send an email message to Account.

Add a Perform a Bound Action step and select the below details within this step.

Table Name = Email Message

Action Name = “SendEmail”

Row ID = Unique Identifier of Email Message created in the previous step

IssueSend = Yes

Find screenshot below

Power Automate Flow

Step 5: We have sent an initial mail so will wait for 2 days and send a follow-up email to the Customer.

Add a Delay Step in power Automate with Count as 2 and Unit as Day as seen in the screenshot.

Power Automate Flow

Step 6: Now to create a new email, add a step “Add a new Row” and select Email Message Table Name with the below-listed details in the email message:

  • From: Created By of the Opportunity
  • To: Account of the Opportunity
  • Subject: Add a subject based on your requirement
  • Description:

Email content of current follow-up Email

——————- Original Message ——————-

From: Sender’s Email

Sent: Sent On of the previous email

To: ‘torecipients’ of the previous email

Subject: subject of the previous email

Description of the previous email

  • Regarding: Set Opportunity reference so that the email conversation will be respected to Opportunity and available iTimelinene of Opportunity record in Microsoft Dynamics 365 CRM
  • Following: Yes
  • Parent Activity: /emails(<Guid of Previous Email Message>)

Power Automate Flow

Step 7: Add a Perform a bound Action step for sending the Follow-up Email to the Account of the Opportunity.

Power Automate Flow

We have completed developing the power automate flow now save the flow and test the functionality by creating a new Opportunity in CRM.

Power Automate Flow

You can check in Outlook the email will be received as shown below screenshot,

Power Automate Flow

Conclusion

In this way, we can customize the process of sending a follow-up email as a trail mail to the previous email using Power Automate Flow.

The post Send Trailing Follow-Up email in Microsoft Dynamics 365 CRM using Power Automate Flow first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please Follow the Source

The post Send Automatic Follow-Up email in Microsoft Dynamics 365 CRM using Power Automate Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
4693