In our last blog, “Automating Local Document Retrieval and Email Drafting with attachment by using Copilot Studio Part 1“ we discussed how a tailor-made solution developed with Microsoft Copilot Studio enables you to find and exact project information instantly from massive local document stores. We illustrated how the Copilot intelligently uses Power Automate and the on-premises data Gateway to eliminate repetitive search tasks, delivering swift and accurate data extraction.
This blog will demonstrate how to effortlessly transform the key information your Copilot extracts from local documents into official, shareable reports. We’ll walk you through automatically linking these reports to draft emails. This method spares you the usually time-consuming and error-prone action of doing this manually. Finally, it makes sure your precious ideas are not only on screen but also within easy reach for offline usage, formal storing, and effortless sharing with all your stakeholders.
Imagine our system quickly searched and showed you the information you wanted from your local files.
Once you have this information at your fingertips, you just ask your Copilot: “Create a PDF for the above information” (or “Create a Word document for this data”).
You click on the link, and the PDF (or Word document) downloads immediately to your computer. When you open it, you’ll find all the information presented by the Copilot earlier in beautifully formatted form within your preferred template.
This feature enables the dynamic generation of documents containing the searched information, offering a convenient way to consolidate and share findings:
Let’s now explore how this functionality is set up. It is usually managed using Power Automate (Flows) initiated from Copilot Studio, where we’ve configured a dedicated topic to handle the process.
The Copilot receives a command and triggers a dedicated Power Automate flow. This flow takes the summarized or detailed information requested to be documented. It then populates a pre-defined Word template that is stored in SharePoint.
This template ensures consistent branding and structure, seamlessly integrating the dynamic content into designated placeholders.
Next, Power Automate automatically converts the newly generated Word document into a PDF format if requested; otherwise, it retains the DOCX format.
Upon successful document creation, the system provides a downloadable link to the newly generated Word and/or PDF file, allowing users to easily access and save the information. This link typically points to a cloud storage location, which is SharePoint, where the documents are stored.
While a summarized email body is great for quick updates, often, stakeholders require a full, detailed report or document. Manually attaching files, ensuring the right version, and then drafting a contextual email can be a multi-step process prone to human error and delays. The goal is to send comprehensive information efficiently and professionally.
With the crucial project information already retrieved and, if needed, transformed into a portable document as we just discussed, our custom Copilot now streamlines the final step: sharing those detailed reports by integrating document generation directly into email drafting.
Imagine this: You have the detailed project information at hand, perhaps even as a newly generated PDF. You instruct your Copilot: “Draft an email and attach the above PDF.”
The Copilot presents you with a direct link. Once you click, your Outlook instantly opens with the draft email pre-filled and the generated PDF attached, ready for sending.
Similar to document creation, this process is automated using Microsoft Power Automate (Flows), initiated directly from the Copilot Studio topic.
The Copilot interprets your request and initiates a dedicated Power Automate flow. This flow immediately begins two crucial actions in parallel: it prepares the draft email, which uses the “Send an HTTP Request” Action, and it attaches the generated PDF simultaneously.
A unique link is provided to the user, which, when clicked, opens Outlook with the draft email pre-filled and the document attached, ready for sending.
Conclusion:
Building on effortless information retrieval, this solution streamlines the creation of formal documents and comprehensive email communication. Leveraging Microsoft Copilot Studio and Power Automate, it automates document generation and seamlessly attaches them to draft emails. This transforms how organizations manage and distribute detailed information, ensuring efficiency and clarity.