To enable your agent in Copilot Studio to process uploaded files, such as PDFs, you'll need to implement a structured approach to extract text from the file after it has been uploaded. Here are the steps you can follow:
- File Upload Handling: Ensure that you have set up a Question node to allow users to upload files. You can store the uploaded file in a variable using the
First(System.Activity.Attachments)variable to check if a file was attached. - Document Processing: After the file is uploaded, you need to configure your agent to process the document. This typically involves using a document processing agent that can extract text from the uploaded PDF. You can set up workflows that trigger when a new document is added to a specified location (like SharePoint or Outlook).
- Extraction Workflow: The document processing agent should include an extraction prompt that sends the uploaded document to an AI model (like GPT) to extract relevant information. This extracted content can then be formatted as needed (e.g., summarized or translated).
- Configuration: Make sure to configure the document processing agent properly, including setting up connection references and environment variables that the agent will use to access the uploaded files and perform the necessary actions.
By following these steps, your agent should be able to recognize the uploaded file, extract the text, and perform further processing like summarization or translation.
References: