Sharing this automated cloud flow on How to extract text from emails using AI Builder GPT capability.
Prerequisites
- Your environment in the US
- A Power Apps or Power Automate license.
- Dataverse database installed on the environment.
- An AI Builder add-on or trial
- Login to https://make.powerautomate.com/
- Select +Create > Select Automated cloud flow
- Select a name to your flow “Automate extracting text from emails.”
- Select Choose your flow’s trigger > Select When a new email arrives (v3)

- Select Create
- Select + New Step
- Select Html to text (preview)
- Select Body from the Dynamic content list

- Select + New Step
- Select Create text with GPT (preview)
- Type the instructions
Here’s the instructions:
Extract the `orderNumber`, `deliveryNumber` and find the `status` of the following email.
The status can be "Done" or "N/A" or "Undone".
Use CSV format for your answer.
Add headers "Order Number", "Delivery Number" and "Status".
Add a line break at the end of your CSV lines.
If the text below has less than couple of words or looks like a placeholder text, respond “Sorry, I can’t extract information”, otherwise respond with the extracted information.
[Start of text]
Select the plain text content from the Dynamic content list
[End of text]

- Select + New step
- Select Create file (OneDrive for Business)
- Select a Folder Path: Documents (in my example)
- Select a File Name: shipment_status.csv (in my example)
- Select a File Content > Select Text (Generated Text) from the Dynamic content list

- Select Save and Send an email to test it.
Congratulations, you've created a flow that uses an AI Builder to create text with GPT capability.
⚠️ Make sure that AI-generated content is accurate and appropriate before you use it
