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 / Set site name dynamica...
Power Automate
Unanswered

Set site name dynamically to run the flow

(0) ShareShare
ReportReport
Posted on by 173

I have a site script which I am using for multiple site and that script contains a common list which I need for all sites.  Here I am facing one challenges here to run the power automate.  

 

When I have created a new site, the list is by default created for all site collection. Now I want to run my power automate in list item added .  

 

I want to run power automate for that particular list which I have created through script. Could anyone please help me how to achieve this? 

 

 

Categories:
I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at

    Hi @rswain ,

     

    You could lookup the lists in the new site and reference the Name of the list like below.

     

    ericcheng_1-1633589889497.png

     

    Alternatively, you could use the SharePoint API _api/web/lists/getbytitle("List Name").  Here is some details.

     

    ericcheng_3-1633589925990.png

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

  • rswain Profile Picture
    173 on at

    Dear eric, Thanks for your time.

    Actually my requirement is like, I have prepared a site template which will execute when someone create a new site and this script contains list, libraries and content type which will create automatically. 

    I have a X list which will create automatically once the script executed successfully but I want to run a power automate for X list in each site collection. 

     

    But which one you suggested that seems, it will work but how could I find the site name in get Lists step as this should come dynamically. 

     

     

     

  • eric-cheng Profile Picture
    5,171 on at

    Hi @rswain ,

     

    So you want to include the PA flows as part of a template of objects within a site template?

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • rswain Profile Picture
    173 on at

    I have created a PA but its triggered when site being created but I need trigger a flow in list item added.  

  • eric-cheng Profile Picture
    5,171 on at

    Hi @rswain ,

     

    If you need to point your flow to the new list, you can just modify the trigger and update the properties.  Be aware of breaking references in your flow.

     

    Screenshot_20211007-235526_Chrome.jpg

     

    If you are wanting to do this automatically, its a bit more difficult.  See here.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • rswain Profile Picture
    173 on at

    Yes eric.  I need to create a site template though site script and I have done that. but I have a document library which also I have created through site script, however I need to run a PA in document library.  

  • eric-cheng Profile Picture
    5,171 on at

    Hi @rswain ,

     

    Is the PA flow going to have a SharePoint trigger connected to the document library?

     

    If so, I dont see a way to do this apart from the link I provided earlier to edit the PA flow template programmatic. 

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

  • rswain Profile Picture
    173 on at

    ok. Is there any way to set site address dynamically? Actually using Site script,  I have created 100 sites with same site template and I have a document library in all 100 sites with same name but I need to run PA for all document library.

    Is it possible to use one PF for all site collection document library ?  

     

    Here what I did, I have created a column and it will trigger PA when user click on custom button.  And I have passed parameter here like site URl and Item ID. But I don't understand here, how to capture that I/P in PA and use the same site URl inside PA.

     

     

     

     

  • rswain Profile Picture
    173 on at

    Capture12.PNGCapture13.PNG

  • rswain Profile Picture
    173 on at

    Capture14.PNG

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard