Skip to main content

Notifications

Power Automate - General Discussion
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? 

 

 

  • rswain Profile Picture
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    Capture14.PNG

  • rswain Profile Picture
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    Capture12.PNGCapture13.PNG

  • rswain Profile Picture
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    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.

     

     

     

     

  • eric-cheng Profile Picture
    eric-cheng 5,171 on at
    Re: Set site name dynamically to run the flow

    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
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    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
    eric-cheng 5,171 on at
    Re: Set site name dynamically to run the flow

    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
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    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
    eric-cheng 5,171 on at
    Re: Set site name dynamically to run the flow

    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
    rswain 173 on at
    Re: Set site name dynamically to run the flow

    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
    eric-cheng 5,171 on at
    Re: Set site name dynamically to run the flow

    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

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard