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 Platform Community / Forums / Copilot Studio / Using SharePoint RAG t...
Copilot Studio
Suggested Answer

Using SharePoint RAG to get generative output

(1) ShareShare
ReportReport
Posted on by 40
I want to use a node that creates generative output from looking through SharePoint knowledge base. The generative output will be passed through AI Builder for further downstream analysis.
 
However, currently the generative action node only directly outputs and is incapable of storing the output as a variable. Are there any other ways I can do RAG on sharepoint and store the output in my flow.
I have the same question (0)
  • Suggested answer
    Valantis Profile Picture
    5,312 on at
     
    You can capture a SharePoint-grounded generative answer in a variable and pass it to Power Automate or AI Builder.
     
    Option A: Generative answers → variable → Power Automate
     
    1. Add a Create generative answers node, set Input = Activity.Text.
    2. In Advanced settings, create a global variable (e.g. ragAnswer) to store the output and clear Send a message.
    3. Configure Microsoft Entra ID authentication with Files.Read.All and Sites.Read.All for SharePoint/OneDrive sources.
    4. Call your cloud flow and pass ragAnswer as a string parameter, then run your AI Builder model.
    5. Optionally render ragAnswer on a card if you also want to show it to the user.
     
    Option B: Alternatives
     
    - Azure AI Search: Connect your index as a knowledge source, summarize via the generative node, capture in a variable.
    - Custom data via Power Automate or HTTP: Query SharePoint using Graph/SharePoint Search, shape results into an array (columns: Content, ContentLocation, Title) and feed into the generative node's Custom data input.
    Note: SharePoint grounding retrieves only the top 3 results. Make sure content is indexed and file types are supported.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • Prasad-MSFT Profile Picture
    Microsoft Employee on at
    1. Use Power Automate with SharePoint and Azure OpenAI/AI Builder
    • Step 1: In Power Automate, use the SharePoint connector to retrieve the relevant documents/content.
    • Step 2: Pass the retrieved content to an AI Builder “Generate text with GPT” action (or Azure OpenAI action).
    • Step 3: Store the generative output in a variable within your flow for further processing.
    This approach gives you full control: you can store, manipulate, and pass the generative output to any downstream action.
    2. Use a Custom Action in Copilot Studio
    Create a custom action (Power Automate flow or plugin) that:
    • Accepts a user query.
    • Searches SharePoint for relevant content.
    • Calls an AI Builder or Azure OpenAI action to generate a response.
    • Returns the generated output as a variable to Copilot Studio for further use.
    3. Use Knowledge Source Q&A as a Variable (Limited)
    In some cases, you can use a Q&A node with a knowledge source and store the answer in a variable, but this is limited to direct Q&A and not full generative RAG.

Under review

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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 633

#2
Vish WR Profile Picture

Vish WR 301

#3
Haque Profile Picture

Haque 219

Last 30 days Overall leaderboard