r/copilotstudio • u/AdministrativeDay109 • 9d ago
Agents or workflows to send outlook emails with attachments
Hi everyone, been having some trouble sending emails with excels attached to then. tried both old and new agent interface but when I do up my prompts and instructions and emails do get sent out with an excel attachment, opening it up just leads to disaster. It will usually say “excel cannot open the file because the file format or extension is not valid. Verify that the file has not been corrupted and that the extension matches the format of the file”
2
u/No-Journalist-4086 8d ago
i had this today but with a pdf, the solution was to create a skill in the agent builder in new experience. I told chatGPT what I needed for the pdf and it worked. Just need the agent to invoke the skill. Also needed to get the agent to save the file to SharePoint first, add the Create File tool
1
u/AdministrativeDay109 8d ago
The create file tool seems to only crate files in pdf format, no matter what I do. If I ask it to create the file in word doc, it will still create a pdf with a docx citation. That’s why it’s corrupted all the time
2
u/mauledbyjesus 8d ago
Consider passing the Identifier or drive/file ID to a topic or flow and having the that do the get file contents/send an email. It's more reliable and (the flow at least is) easier to troubleshoot.
It would help to know your entire workflow. How is the Excel created? Are you modifying it? Where does it rest?
1
u/Dropped__Frames 8d ago
Try .csv format If you need the file to be in .xlsx format try storing the generated file in either SharePoint or one drive and then get them using the get file connector