Parse SharePoint sharing links in a Copilot Studio agent flow
Diesen Beitrag auf Deutsch lesen
A practical flow passes a SharePoint sharing link from a Copilot Studio agent, queries SharePoint, and returns the site URL and relative file path.
Original article from September 30, 2026: 【Copilot Studio】SharePointの共有リンクを解析する(Agent Flow), by flali, on ふらりのメモ書き. Read the original
This is our own summary, not a republication or full translation.
TL;DR
A Copilot Studio agent flow accepts a SharePoint sharing link, removes its query string, converts the remaining link to modified Base64, and uses SharePoint HTTP GET requests to retrieve the site URL and file relative path. The two values are returned to the agent as text outputs.
Why it matters
- Makers: Pass the chat-entered SharePoint sharing link into the agent flow and return siteUrl and fileRelativePath as text outputs.
- Admins/IT: Configure the flow with a selected SharePoint site address and HTTP GET requests for the driveItem and site endpoints.
Frequently asked questions
How does a Copilot Studio agent flow decode a SharePoint sharing link?
The flow removes the query string, encodes the remaining link with modified Base64, and uses the result in a SharePoint driveItem request.
What does the SharePoint sharing link flow return to the Copilot Studio agent?
It returns the SharePoint site URL and the file relative path as two text outputs in the agent response.
Can this SharePoint link parsing method be used in Power Automate cloud flows?
Yes, the described method can also be used in a Power Automate cloud flow because the agent flow is a cloud flow.
