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 / Trigger flow from Shar...
Power Automate
Answered

Trigger flow from SharePoint document library column - generic

(0) ShareShare
ReportReport
Posted on by 225
Hi,
 
I want to make a solution that I can use on multiple document libraries. I want to have a column with a column "Archive". When you click the button, I want a flow to start and give me the option to fill in two text fields in the panel before I run the flow. 
 
The flow should catch the input together with the site, library name and file that the flow was triggered from. 
 
I have tried so many solutions on this, but no luck yet. Anyone that has a working solution for me?
Categories:
I have the same question (0)
  • Suggested answer
    Tomac Profile Picture
    4,048 Moderator on at
    You can add a Flow button to a SP List by changing the formatting of that column to the following code:
    {
      "$schema": "https: //developer.microsoft.com/en-us/json-schemas/sp/column-formatting.schema.json",
      "elmType": "span",
      "style": {
        "color": "#0078d7"
      },
      "children": [
        {
          "elmType": "span",
          "attributes": {
            "iconName": "Flow"
          }
        },
        {
          "elmType": "button",
          "style": {
            "border": "none",
            "background-color": "transparent",
            "color": "#0078d7",
            "cursor": "pointer"
          },
          "txtContent": "YOUR_FLOW_NAME",
          "customRowAction": {
            "action": "executeFlow",
            "actionParams": "{\"id\": \"YOUR_FLOW_GUID\"}"
          }
        }
      ]
    }
     
    Then in Power Automate, use the For Selected Item trigger:
     
    Here's a handy blog post from Tom Riha about how to accomplish this task as well, if you need a bit more context.
  • Suggested answer
    Fredrik_A Profile Picture
    3,570 Super User 2026 Season 1 on at
    Hello,
     
    If you want to trigger it from the built in Power Automate menu in SharePoint you will need one flow per library. 

    You could try making this with webhooks and trigger a flow that way via "When a http call is recieved". I did something similar, but with 1 library only, not sure if it could work using multiple ones in the same flow.
     
    If my response solved your issue, please mark it as ✅ Accepted Answer and give it a like.
  • Verified answer
    Pstork1 Profile Picture
    69,129 Most Valuable Professional on at
    There are two things that make this request almost impossible to do.
    1) Triggers are specific to a particular Document library. There is no way to create a single automated trigger that will fire from multiple libraries. The best you can do is to create a short flow for each library that contains a Trigger and an action to call a child flow. Then put all the work you want to do in the child flow.
    2) The second issue is that Automated flows don't provide any opportunity for user interaction before the flow kicks triggers. So there is no way for you to input information. The workaround for this one would be to send an Adaptive Card to the user via email. They can fill out the card and send it back to the flow. The flow would then proceed.
     
    One additional issue with #1. Any action you want to take on the document library is also going to face the same problem as the trigger. Its very difficult to create a SharePoint action with a dynamic document library because the action won't know the schema of the library. It can be done using an Item: record, but its very difficult.  The bottom line is to pull this off you would need to be an advanced Power Automate developer. Since you are asking here I assume you aren't that advanced.  My advice is to look for a different way. This isn't going to work the way you want it to.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • TonjeItIs Profile Picture
    225 on at
     
    Thank you. This is also what I have found out, but I was hoping is was a workaround that I didn't know about. 
     
    So do you have any suggestions on a solution here? We want to have a way of getting a lot of document libraries to be able to archive documents using a button that triggers a flow. But maybe Power Automate will have to cave in here? Power Apps is a solution, but that will trigger a lot of licenses i guess...
  • Suggested answer
    Pstork1 Profile Picture
    69,129 Most Valuable Professional on at
    Not sure this helps, but if you focus on one library you can create a Manual trigger flow that can be triggered from a button in the Library.  You can include parameters on a manual triggered flow. In that case the user would be prompted for the values when they trigger the flow for a specific file. Once you have that flow built you can make copies and change the value of the site/library in each of the trigger/actions. if the schema of the library is different you'll have some other things to fix as well. But you can then use a copy with minimal changes for each library.  Without getting really advanced that is the best you can do.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • TonjeItIs Profile Picture
    225 on at
    Thanks for the suggestion @Pstork1, I might think about this for a while =)

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 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard