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!