Exercise - Build an approval email that uses the Invoice Processor model
Follow these steps to create an approval email flow that uses information from your Invoice Processor model you created.
Build an Approval Flow
In necessary open the Power Automate maker portal.
Create a new automated cloud flow.
Name the flow Approve Invoice.
Search for when a new email arrives in the search bar then select When a new email arrives (V3) under Choose your trigger.
Sign in with your Outlook account. Click Show advanced options.
Select Yes for Include Attachments and Has Attachment or Only with Attachments
Anteckning
depends on the version of the Outlook connector
Enter new invoice in Subject Filter box.
Add a new action AI Builder Predict Action.
Configure as follows:
- Model: Invoice Processor
- Document Type: Attachments Content Type (Use Dynamic values from the Outlook V3 Connector)
- Document: Attachments Content (Use Dynamic values from the Outlook V3 Connector)
Under the Predict action you just configured, select Add an Action.
Select the Outlook connector and choose Send Email with Options.
In the To field, select Enter a custom value, and enter your email address.
In the Body field, past the following text.
“AccountValue” has submitted the following invoice:
Invoice Number: “InvoiceNumValue”
Invoice Date: “InvoiceDateValue”
Invoice Amount: “TotalAmtValue”
Replace the items in “quotes” with the appropriate Dynamics value from your Predict step. You completed Email body will resemble the image below:
In the Subject field, enter the following text: Invoice “InvoiceNumValue” from “AccountValue” requires your approval.
Replace the text in “quotes” with the appropriate Dynamics Values from your Predict Step. Your completed subject will resemble the image below.
In the User Options field, change the choices to Approve, Reject.
Save your Power Automate Flow.
Test your Approval email solution
- Open your Outlook (Or corresponding email program) and Send an email to yourself.
- In the Subject field, enter b.
- Attach the Sample Invoice that was included in the class files download, and send the email.
- After a few minutes, you'll receive an email asking you to approve the Invoice.
Congratulations! You have a working invoice approval process using an AI Builder document processing model.