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

Community site session details

Session Id :
Engage with the Community
Unanswered

PowerAutomate Flow to grab the URL of a Sharepoint site the flow is run from

(1) ShareShare
ReportReport
Posted on by 2
Hi
 
I am developing a SharePoint online permissions app so people can request and approve permissions to document libraires. I have everything working but the request part it currently picking up the SharePoint document libraires and sites from a SharePoint list held on another SharePoint site. So currently the user selects the SharePoint site from a drop down list (populated from the SharePoint list) and then selects the document libraires they require access for.
 
What I would like to be able to do is for a user to click on a link to launch the flow from a link on a SharePoint site and only see the document libraries for that site.
 
We have around a 100 Sharepoint sites and what I am planning on doing is placing a link on each site home page to launch the app so I would like it to be able to pick up the URL of the site the flow is launched from pass this as a parameter to the app and filter the SharePoint list to only show document libraires that match the url.
 
I am happy if this can be done by either creating a flow to capture the url and pass to the app or by passing the url directly to the app.
 
Do you know if this is possible and if so how to do it? The grabbing the url the flow/app is launched from?
 
 
Thanks
 
Dom
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    668 on at
    PowerAutomate Flow to grab the URL of a Sharepoint site the flow is run from
    Hi,
     
    Hi Dom,

    Yes, this is definitely possible, you can follow the below method to achieve this.

    Pass the Site URL as a Query Parameter

    The simplest approach is to pass the site URL directly to your app via a query parameter in the link.

    Step 1: Create the Links

    On each SharePoint site's home page, create a link that includes the site URL as a parameter:

    https://[your-power-apps-url]?siteUrl=https://yourdomain.sharepoint.com/sites/SiteName



     
    Step 2: Capture the Parameter in Power Apps

    In your Power Apps app, capture the parameter when the app starts. Add this to your App's OnStart property or on your first screen's OnVisible property:

    Set(varSiteURL, Param("siteUrl"))

    Step 3: Filter Your Document Libraries

    Use the captured site URL to filter your dropdown to only show document libraries for that specific site:

    Filter(YourSharePointList, SiteURL = varSiteURL)

    Hope this helps.
     
    Thanks!
    Inogic

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Engage with the Community

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 57 Super User 2025 Season 2

#2
Pallavi Phade Profile Picture

Pallavi Phade 51

#3
Adis Profile Picture

Adis 20 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans