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 :
Power Automate - Using Flows
Suggested answer

When approval status on any file on Sharepoint site is approved runs a trigger

(0) ShareShare
ReportReport
Posted on by 281
Hi guys,
Let me explain the SharePoint site i am working on.
It's a site with multiple subsites and libraries so what i want to do is whenever a file is created on any of those subsites and libraries I want to get the information modified in the master list in the main site.
So, the main thing I want is when the column "Approval status" which is one of the columns with 3 options SharePoint gives is Approved, send an email to me.
 
I am using sharepoint on premise so I cant use manual button flows so I thought this would be the best option. So the thing is how I create the trigger so it runs correctly with all the "Approved" files in all the subsites libraries. The trigger is the same on every library but it just changes the URL.
 
Is it possible to get it in just one flow or should I have to create one flow for each library or subsite.
 
Thanks
I have the same question (0)
  • Suggested answer
    Expiscornovus Profile Picture
    33,052 Most Valuable Professional on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    Can you try the below trigger condition expression? And it would be a flow per library btw.
     
    @equals(triggerOutputs()?['body/{ModerationStatus}'], 'Approved')
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    Hi, so I am trying that but the thing is the idiom of my SharePoint is different and that condition expression (I think) doesn't apply to mine.
    @equals(triggerOutputs()?['body/{Estat_x0020_d'aprovació}'], 'Aprovat')
     
    Where could I see the name of the column to add it correctly? It seems the one I added doesn't run the flow.
    The column doesn't appear in the library settings:
    This is how my flow looks but I don't know what the compose does in here. 
     
    Thanks for your time! @Expiscornovus
     
  • Expiscornovus Profile Picture
    33,052 Most Valuable Professional on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    Normally you can find the internal name in several places. You can for example place the column in a Compose action and inspect the name via the Peek code option.
     
    Ellis Karim also has a nice article about the other approaches as well:
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    Hi the thing is a predefined column (version settings) in SharePoint and is not on any of those places they show:
     
    As you can see in the image below I can't click in the "Estat" column to see the internal name.
     
    Let me know if there is any way to solve this. When turning it to "Aprovat" the flow doesn't run.
     
    Thanks for your time!
  • Expiscornovus Profile Picture
    33,052 Most Valuable Professional on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    If it is the Approval Status system column the internal name will be the same as in my example I shared earlier. This is because Microsoft has created it and they will always use the same internal names.
     
    Only the values in your case will be translated (Approved vs Aprovat).
     
    Can you try the below?
    @equals(triggerOutputs()?['body/{ModerationStatus}'], 'Aprovat')
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
    Hi! 
     
    It still doesn't run... I don't really know what I am missing: I tried 4 times aproving 4 files, and it's not running.
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    So I found that the Moderation status is the next one look:
     
    So I changed the flow to "When create file" --> Create item and get the information from the column Approval Status (_ModerationStatus) in the library to a column in a list.
     
    List:
     
    Library:
     
    So I add the expression: triggerOutputs()?['body/{_ModerationStatus}'] in the create item action but doesn't run.
     
    Do you know what its wrong doing it this way?
     
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    So what I think it was missed was the "_" in the {_ModerationStatus}. But when doing tries none of them are running so I think that is not the internal name of the column or we get one wrong but it's supposed to be that one.
     
    Are you getting it right when doing the same? I am getting no data returned because the trigger don't run :(
  • Expiscornovus Profile Picture
    33,052 Most Valuable Professional on at
    When approval status on any file on Sharepoint site is approved runs a trigger
     
    Not sure if this is because you are using a different language? I have double checked it in my setup and in my instance the field was without the underscore. I have seen it before with an underscore as well though 😅.
     
    You can double check by just adding the field in a Compose, this is the easiest way to see what the actual name is.
     



     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • Charlie Martharper Profile Picture
    281 on at
    When approval status on any file on Sharepoint site is approved runs a trigger
    Hi
     
    The thing is it doesn't appear it automatically and I have to introduce it manually:
    Look, when creating item, I want to add that column when creating the file, create an item with the column status. But when the trigger runs and its the turn to add the value, it ignores it and goes to the next one (Estat GD Value) look:
    What is going wrong?

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 489 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 471 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 261

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow