Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Problem with a simple flow ...

(1) ShareShare
ReportReport
Posted on by 162

Hello,

I’m having an issue with a fairly simple automation, and I’m not sure what’s going wrong.

I want an email account to identify a tag in the email's subject line upon receiving a message. Up to this point, everything works fine.

Afterwards, for each message identified with the correct tag, I want to save the attachments to OneDrive only if they are .docx, .doc, .xlsx, .xls, or .pdf files.

 

When I run a test of my flow, the automation detect the attachments, but it doesn’t recognize any of them as ending in .pdf or .docx (for the test).

 

The flow :

 

 

 

 

i don't understand where is the problem ...

 

Kind regards

  • Suggested answer
    SaiRT14 Profile Picture
    1,988 Super User 2025 Season 1 on at
    Problem with a simple flow ...
    Here are high level steps:
    • Trigger: When an email is received.
    • Condition: Check for the tag in the subject line.
    • Action: Use the Apply to Each action to loop through all attachments.
    • Condition Inside the Loop: Check the file extension using endsWith() and toLower().
    • Action: Save the attachment to OneDrive if the file type matches the allowed extensions.
  • GreguS Profile Picture
    162 on at
    Problem with a simple flow ...
    Yes for your response i am a noobs seriously ...
  • Verified answer
    Expiscornovus Profile Picture
    31,779 Most Valuable Professional on at
    Problem with a simple flow ...
    In your condition you have swapped the order of the field and the value. Like you mentioned, you want to check if the Name ends with .doc.
     
    Please place the Name field on the left side and the '.doc' text on the right side.
     
     
     
  • Verified answer
    Ellis Karim Profile Picture
    11,053 Super User 2025 Season 1 on at
    Problem with a simple flow ...
     
    Just change the ordering of the condition to
     
    We are testing: if the filename ends with .docx etc.


    The flow Condition changed to support  multiple different file types.


    Ellis

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics

Restore a deleted flow