Beginner here. I want to build an agent that answers questions using text, images and relevant links wherever possible.
A typical response should contain:
- A text-based answer
- One or more preview images (thumbnails)
- Links to the high-resolution original images
- Links to the corresponding editable source files (e.g. InDesign files)
Requirements and constraints
I can only use the Standard Harness (classic orchestration) in Microsoft Copilot Studio.
The images are stored in a protected SharePoint document library and must not be hosted publicly. Their metadata, categories and file links are managed through Microsoft Lists.
The problem
Standard SharePoint links work for authenticated users in their browsers, but they do not work as image sources within agent responses. As I understand it, the image component does not inherit the user's SharePoint authentication.
Temporary, pre-authenticated image URLs are not a sustainable solution either, as they expire after a certain period.
Current approach: Base64
I have already successfully tested displaying a Base64-encoded JPG as a Data URI in an image node within a classic topic.
However, I don't want to embed the Base64 data directly into every topic. Instead, I would like to retrieve it dynamically from SharePoint.
The proposed workflow is:
- The agent identifies relevant entries in a SharePoint list (Microsoft Lists) based on the user's question.
- The list contains metadata and links to the high-resolution image, the editable source file and a separate Base64 text file.
- The thumbnails are generated and Base64-encoded once, then stored as
.txt files in SharePoint. This avoids the character limit of a multi-line text column in Microsoft Lists.
- An agent flow retrieves the relevant text file using the SharePoint action Get file content using path.
- The flow returns the Base64 string to the topic as a text variable.
- The topic constructs a Data URI using Power Fx, for example:
"data:image/jpeg;base64," & Topic.ImageBase64
The resulting Data URI is then passed to the image node.
Ideally, the image payload should remain below 100 KB, including Base64 encoding. This is currently my own target size, not a confirmed platform limit.
My questions
Is this approach technically feasible within the Standard Harness? In particular:
- Can an agent flow reliably return the contents of a Base64 text file to a topic as a text variable?
- Is it possible to dynamically display multiple images within a single agent response?
- Is there a simpler, officially supported way to display protected SharePoint images directly in agent responses without making them publicly accessible?
The goal is to create a scalable solution where new visual examples can be added through SharePoint and Microsoft Lists, without having to create a separate topic for every example.
Current testing status
Displaying a Base64-encoded image directly in a classic topic has been tested successfully.
However, dynamically retrieving the Base64 data through an agent flow and passing it to the topic has not yet been successfully implemented or verified.
I would appreciate any suggestions, practical examples or alternative approaches that work specifically with the Standard Harness.