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 : when a speci...
Power Automate
Answered

Trigger : when a specific OneDrive file is modified

(0) ShareShare
ReportReport
Posted on by 22

Hello,

 

I'm trying to build a flux which will update a power BI dataset when a specific excel file (named "labellisation.xlsx") is modified in my one drive

 

The Trigger I added is "when a file is modified" from One Drive. I selected the correct folder and now when I modified any file in it my power BI is updated

 

Now I want to add a condition so the trigger works only if its "labellisation.xlsx" that is modified

 

I try using the same condition as the one I use when I use the "When an item or a file is modified" trigger from sharepoint : @contains(triggerOutputs()?['body/{FilenameWithExtension}'], 'labellisation')

 

But this condition does not work. I guess the condition syntax is not the same for a one drive trigger and a sharepoint trigger but I couldn't find the correct one

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,976 Moderator on at

    Hi,

     

    Please try this

     

    You can do either of this

     

     

    @contains(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'labellisation')
    
    @equals(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'labellisation.xlsx')

     

     

    Please note if you try to "test" it manually it will fail and say your have a null string which is true because there was no passed in filename yet.

     

    So save it, then make a change and then look in the history to validate. 


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • DB-10091421-0 Profile Picture
    22 on at

    It works with 

    @equals(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'Labellisation.xlsx')

    So my problem is solved, thanks for your help

    But not with (error message : One or more fields provided is of type 'Null', a different type is expected.)

    @contains(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'Labellisation')

     

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 607

#2
Valantis Profile Picture

Valantis 495

#3
Vish WR Profile Picture

Vish WR 429

Last 30 days Overall leaderboard