web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy files from OneDri...
Power Automate
Unanswered

Copy files from OneDrive to SharePoint (only if name contains certain text)

(0) ShareShare
ReportReport
Posted on by

Hi, I have a flow that copies files from a OneDrive folder to SharePoint which works (first pic), but I only want it to copy files if they contain certain text in their name. I added a condition (second pic) but it didn't work. Where am I going wrong?

 

DEBS1644_0-1693497615501.png

DEBS1644_1-1693497727355.png

 

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @DEBS1644 

     

    You need to compare the file name by writing an expression in the condition action. Expressions are written in the expression box as highlighted in the below screenshot:

    ManishSolanki_0-1693499983157.png

    Expression used for left side operand:

    contains(triggerOutputs()?['headers/x-ms-file-name-encoded'],'ESG-SF116')

    Expression used for right side operand:

    true

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • DEBS1644 Profile Picture
    on at

    Hi, just tested it and got this error. The files are contained in subfolders, which worked without the expression, but obviously was returning all files. It seems it can't find the files in subfolders.

    DEBS1644_0-1693559204671.png

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @DEBS1644 

     

    Could you pls share the screenshot of condition action along with expression in edit mode.

     

    Thanks

  • DEBS1644 Profile Picture
    on at

    DEBS1644_0-1693564717687.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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard