web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate - AI Builder
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Get Sharepoint File and Generate the Link

Posted on by

Hi Masters, 

 

I would like to create a function to have our bot in copilot studio that can-

 

- We type keyword of file like web search

- Bot index the keyword and search the file in Sharepoint 

- Generate the link to view

 

The following are 2 scratch path I am making at half stage which I don't know how to continue, as you see in attachment.

It will be great I could learn and be advised how to compete this work.

 

 

Option #1
 

1. Run a flow from Copilot - (Test Successfully)


  • Add an input

  • Text

  • Keyword


  •  

2. Sharepoint: Get Files (Property Only) - (Test Successfully)


  • Filter Query: concat('substringof(''', triggerOutputs()?['body/Keyword'], ''', FileLeafRef)')

  • Order by: FileLeafRef

  • Include Nested Items: Yes


  •  

3. Data Operation: Select - (Test Successfully)


  • From: Sharepoint- Get Files (Property Only)- body/value

  • Map: FileName- item()['{FilenameWithExtension}']

  • Map: IsFolder- item()['IsFolder']


  •  

4. Data Operation: Filter Array - (Test Successfully)


  • From: Data Operation- Select- Output

  • Filter Query: item().IsFolder - is equal to - false


  •  

5. Data Operation: Compose - (Test Successfully)


  • input: json(string(body('Filter_array')))


  •  

6. Respond to Copilot- (Test Failed)


  • File: Data Operation- Compose- Outputs
 
 
Option #2
 

1. Run a flow from Copilot - (Test Successfully)

 

  • Add an input
  • Text
  • Keyword
 
2. Initialized variable
 
  • Name: FileLinks
  • Type: String
  • Value: Respond to Copilot- Keyword
 
3. Sharepoint: Get Files (Property Only)
 
  • Filter Query: substringof('variables('variable')',FileLeafRef)

 

 
The above is what I couldn't will get it done. It will be great if someone gimme a hand. 
Thank you so much in advance!
Screenshot 2024-0...
Screenshot 2024-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics