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 / Search for a file in s...
Power Automate
Answered

Search for a file in specific folder on Ondedrive with dynamic parameter and attach it to email

(0) ShareShare
ReportReport
Posted on by 2

Hello 

 

I try to write an automated flow in which it should search in a given path on onedrive the specific weeknumber 

Files are word files and syntax of the name contains YEAR and Weeknumber eg. 202251

 

For the given weeknumber based on the day of the flow it should go and look for the given file (note there is only one file in the folder which will be named xxxxxx202251.docx 

 

Then this file should consequently be attached to the email 

 

Can someone help me pls ? 

Categories:
I have the same question (0)
  • Verified answer
    v-chengfen-msft Profile Picture
    on at

    Hi @JB2511 ,

    Here is a test for you reference:

    Flow will execute every day, find the file in the folder according to the year and number of the week, and send the file as an attachment

    vchengfenmsft_0-1672041736587.pngvchengfenmsft_1-1672041794031.pngvchengfenmsft_2-1672041839166.png

     

    Best Regards

    Cheng Feng

  • JB2511 Profile Picture
    2 on at

    Hello thanks for the solution all be it that year function is not returning the correct value but solved it this way : 

     

    int(formatDateTime(utcNow(),'yyyy'))
     
    Kind regards 

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard