Skip to main content

Notifications

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

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!
Categories:
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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard