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 / Difficulty in creating...
Power Automate
Unanswered

Difficulty in creating flow to save attachment that does not have certain filename

(0) ShareShare
ReportReport
Posted on by 1

Hello Community, 

I am in the process of building a flow to save only pdf files that does not have SPA or FRE in the email attachment's filename. I also want the flow to ignore png files. I kept on getting this error below. If someone can help, it will be greatly appreciated. Thanks in advance.

 

Error: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'startsWith' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#startswith for usage details.'.

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @snowfoxice ,

     

    This is because that the first parameter is an array but the function startswith expects a string.

    So you should use 'apply to each' action to get every attachment name and attachment content.

    vxiaochenmsft_0-1654222060170.png

     

    Best Regards,

    Wearsky

     

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard