Re: Summarise document that has been uploaded
For now, you will have to follow a custom pattern. Here's a custom canvas that will send an attachment to Power Automate: upload_pa_template_html (github.com).
You copilot will intercept an event from the custom canvas, telling the copilot a file with a specific GUID has been uploaded to Dataverse. Then it is up to you do something with the file (e.g. send to AI builder):
kind: AdaptiveDialog
beginDialog:
kind: OnEventActivity
id: main
eventName: uploadFile
actions:
- kind: SetVariable
id: setVariable_ZaaEfM
variable: Topic.fileID
value: =Text(System.Activity.Value)
- kind: SendActivity
id: sendActivity_lis3Um
activity: Thanks! trying to extract data now using a highly sophisticated AI model
- kind: InvokeFlowAction
id: invokeFlowAction_W4gGku
input:
binding:
text: =Topic.fileID
output:
binding:
amounttotal: Topic.amountTotal
vendorname: Topic.vendorName
flowId: cb32bb85-a0c3-ee11-9079-000d3a119782
- kind: SendActivity
id: sendActivity_I6gp0P
activity: Here are the details I've extracted. Double check the details and click submit.
- kind: AdaptiveCardPrompt
id: amfJgd
card: |-
={
type: "AdaptiveCard",
body: [
{
type: "TextBlock",
text: "Invoice Details",
weight: "Bolder",
size: "Medium"
},
{
type: "Input.Text",
id: "vendorName",
placeholder: "Vendor Name",
value: Topic.vendorName,
label: "Vendor Name"
},
{
type: "Input.Number",
id: "invoiceTotal",
placeholder: "Invoice Total",
min: 0,
value: Topic.amountTotal,
label: "Invoice Total"
}
],
actions: [
{
type: "Action.Submit",
title: "Submit",
data: {
submitType: "vendorInvoiceSubmission"
}
}
],
'$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.4"
}
output:
binding:
actionSubmitId: Topic.actionSubmitId
invoiceTotal: Topic.invoiceTotal
submitType: Topic.submitType
vendorName: Topic.vendorName
outputType:
properties:
actionSubmitId: String
invoiceTotal: Number
submitType: String
vendorName: String
- kind: SendActivity
id: sendActivity_oOlNM2
activity: |-
Thanks!
I'll submit the invoice for approval