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 / Power Automate / Retrieve the content o...
Power Automate
Suggested Answer

Retrieve the content of Azure DevOps wiki using Power Automate Flow

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I'm working on a project to create a copilot bot using Copilot Studio and leverage Azure DevOps Wiki as its knowledge base. To achieve this, I'm aiming to build a Power Automate flow that can search the wiki and retrieve content based on user queries.

However, I've encountered a roadblock: Azure DevOps Wikis seem to lack a dedicated search API. Without this API, I can't directly query the wiki to access specific information for the Copilot bot.

I'm reaching out to the community to see if anyone has experience using Azure DevOps Wikis in a similar way. Perhaps someone has encountered this challenge and discovered a workaround solution?

Any insights in advance would be greatly appreciated. Thanks in advance for your help.

Categories:
I have the same question (2)
  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @Suma_Sai,


    It looks like the Azure DevOps REST API has a Fetch Wiki search results method:

    https://learn.microsoft.com/en-us/rest/api/azure/devops/search/wiki-search-results/fetch-wiki-search-results?view=azure-devops-rest-7.1&tabs=HTTP

     

    Personally I haven't tested this method before (I will try it later today in my own Azure DevOps Org 😁), but I would suggest to look into that one because it might match your requirements?

  • CU11101054-0 Profile Picture
    on at

    Thank you @Expiscornovus  for your quick response. I am new to Power automate and I am unable to figure out how to perform this task in a the form of a flow. Can you please guide me on how you successfully retrieved the wiki using this api?.

    Thank you very much for your support.

    Suma

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @Suma_Sai,

     

    Below is an example.

    This sample uses two HTTP request:

    Get page

    Fetch Wiki Search Results

     

    1. First HTTP action to get 1 search result

     

    URI

    https://almsearch.dev.azure.com/@{variables('OrgName')}/@{variables('Project')}/_apis/search/wikisearchresults?api-version=7.1-preview.1

     

    Body

    {
     "searchText": "@{triggerBody()['text']}",
     "$skip": 0,
     "$top": 1,
     "filters": null,
     "$orderBy": null,
     "includeFacets": true
    }

     

    2. Second HTTP action to retrieve the content of that single search result

    https://dev.azure.com/@{variables('OrgName')}/@{variables('Project')}/_apis/wiki/wikis/@{first(body('HTTP')['results'])['wiki']['id']}/pages?path=@{slice(first(body('HTTP')['results'])['path'], 0, -3)}&includeContent=True&api-version=7.1-preview.1

     

    example_wikisearch.png

     

    Both use a HTTP action with a Personal Access Token for the authentication because I got a cannot access resource message when using the out of the box Send an HTTP request action.

     

    basicauthaccesstoken.png

  • CU11101054-0 Profile Picture
    on at

    Thank you very much @Expiscornovus  for your response. The above provided guide helped me a lot. I have made the following changes to make it compatible to the input format of the custom data section in copilot studio.

    Suma_Sai_0-1715181574567.png

    Following this step I have parsed the output and converted into a table in Copilot studio. Later used this expression to format the input and set it to a new variable in copilot studio :

    ForAll(Topic.Table,
        {
            Content: content,    
            ContentLocation: ContentLocation
        }
    And upon passing this input , I was able to receive the generative AI response from the copilot studio.
    But I am facing the following problems, can you please throw help me out to reach the solution:
    1) How to handle the authentication: Because I am going to use this flow in Copilot studio topic  , how do I handle personal access tokens. How can a user who is dynamically triggering the flow enter personal access tokens, can you help me a way to automate this step so that whenever this flow is triggered in the copilot studio , the user can seamlessly be authenticate on the Azure devops environment and perform these two http calls.
    2) I have encountered the following error in the second http call to retrieve the content of the devops wiki:
    Suma_Sai_1-1715182444784.png

    Upon careful examination I understood that this error is cause due to the encoding of the URL. The name of the wiki is "cloud computing" due to url encoding the space is encoded as hyphen "cloud-computing", which is resulting in a failed flow.  I have tried to manually edit the url where I replaced the space with "cloud%20computing" and I was able to see the page with the content. Can you let me know how to handle this situation in the flow.

     

    3) Lastly i am trying to retrieve top three unique results from the first search http call. Followed by retrieving the content from these three unique wiki results. Parse them and then send them to the copilot studio. I am trying to perform this step because in this way I will be able to provide more content to the generative AI. Can you help me in constructing this flow.

     

    Excuse me the pouring queries, your help is greatly appreciated.

    Thank you 

    Suma

  • Suggested answer
    NT-28111254-0 Profile Picture
    2 on at
    @CU11101054-0

    I am also working on the same. Would like to check if you got the answer for above?

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard