This flow runs automatically when a new record is created in the Account table in the Dataverse. The flow gets the customer name from the record and uses the custom connector to send a pre-configured request to the Azure OpenAI service to get the number of employees, industry, and 3 news about the customer based solely on the company name. The received information is validated and stored in custom columns in the Account table in the Dataverse.
Don't worry about this section, we'll take care of it. Unless you really want to...
Solution | Author(s) |
---|---|
Get-validate-save-customer-data-using-AzureOpenAI | Katerina Chernevskaya (LinkedIn), Awara IT Academy |
Version | Date | Comments |
---|---|---|
1.0 | April 12, 2023 | Initial release |
This sample illustrates the following concepts:
- Use custom connector with pre-configured prompt to retrive required data about a customer
- Using Environment Variable to store api-key for easy parameter management
- Validate and clean information received from Azure OpenAI to store in Dataverse only verified values
This solution includes 5 objects:
- Environment Variable
API key
- Connection References
CustomerConnectorConnection
andDataverseConnection
- Flow
Get data for Account using Azure Open AI
- Table
Account
with 4 columns:
- Azure subscription
- Azure OpenAI resource created and a model deployed using Azure OpenAI
- Installed the Get required info with Azure OpenAI - custom connector
Please follow steps described in the Prerequisites and Minimal Path to Awesome sections to install the Get required info with Azure OpenAI - custom connector before you proceed with the next steps.
- Download the
.zip
from thesolution
folder - Go to Power Automate Studio, go to
Solutions
and clickImport solution
- Select the solution by clicking
Brows
button and press theNext
button - Review all fields on the next screen and click
Next
button - On the next screen configure connections - to the custom connector and to the Dataverse
Once both connections are configured - click
Next
button - On the next screen provide the API key from your Azure OpenAI service and click the
Import
button
After the solution will be imported successfully - you will see the notification and the solution will be available in the list.
-
Open the solution
Get-validate-save-customer-data-using-AzureOpenAI
and update Environmental Variable value with your API key.
Once all steps will be completed you can use this flow for your Account table, for example for your CRM.
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Note: don't worry about this section, we'll update the links.
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you encounter any issues while using this sample, create a new issue.
For questions regarding this sample, create a new question.
Finally, if you have an idea for improvement, make a suggestion.