Building and customizing solutions using Microsoft 365 Copilot APIs and tools
I dont have the topic feature in the new harness copilot so how come i will be doing this?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have built an agent whose responsiblity is based on the knowledge mapping which is CSV file it should be able to first generate all the details such as to,cc,subject,body etc and it should also be able to attach the input document which is added in chat by user and send the attachment with the help of send email v2 tool of outlook with the attchment but when i am trying to do the same it is not able to fetch the attachment document which was in the chat so how can i add this even though there is no metadata as well for the file except the name there is no content which can be accessed and the file can be sent to email. sometimes email works but the file is cuorrupted as there is no data its only the name.
Building and customizing solutions using Microsoft 365 Copilot APIs and tools
I dont have the topic feature in the new harness copilot so how come i will be doing this?
AI answer
Use the file from System.Activity.Attachments and pass both the file name and file content explicitly to the Outlook action. The corruption happens when only the file name is passed and contentBytes is empty or mapped incorrectly.
Recommended setup:
First(System.Activity.Attachments)
.Name.ContentFirst(System.Activity.Attachments) first.contentBytes and name keys.
{ contentBytes: Topic.userReceipt.Content, name: Topic.userReceipt.Name }
System.Activity.Attachments directly for a tool, use:
If(
IsEmpty(System.Activity.Attachments),
[],
[{ contentBytes: First(System.Activity.Attachments).Content, name: First(System.Activity.Attachments).Name }])
)
For the scenario described, the most likely fix is:
First(System.Activity.Attachments) in a variable,.Content to contentBytes,.Name to name,If only the name is available in the current topic path, the file was not captured through the file input path correctly, or the attachment input was mapped in the wrong format.
References: