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 / Issues in finding weat...
Power Automate
Answered

Issues in finding weather the triggered email contains attachments or not.

(1) ShareShare
ReportReport
Posted on by 26

I have developed a flow where the new email will be triggered and then I have added a condition where it checks weather the email recieved  has the attachments or not, and added remaining functions based on the condition. Now when i am testing the flow if the email comes with an attachment, it is returning fine and doing all the steps but when an email comes without an attachment, then it is not returning any thing and showing flow has been run successfully.

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

    Hi @Anand3 ,

     

    Can you share the output from one of those runs without attachments?  What steps are completed?  Thanks!

     

     

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anand3 

     

    if i am right, you want to trigger the flow only when email has attachments present with it.

     

    So in that case just select option as Yes for the below highlighted field

    Nived_Nambiar_0-1703775988871.png

     

    Refer this: https://manueltgomes.com/reference/power-automate-trigger-reference/when-a-new-email-arrives-trigger/

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Anand3 Profile Picture
    26 on at

    Hi @Nived_Nambiar 

    Thanks for your response.


    No, I want to trigger the emails which do not contain attachments also and perform the functions based on the conditions provided. Just I want to know how to clearly check weather the new email which is triggered contains attachments or not and do the remaining functions based on that.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anand3 

     

    Then use the following condition 🙂

    Nived_Nambiar_0-1703781085450.png

    Expression used in condition (Left side):  length(triggerOutputs()?['body/attachments'])

     

    This checks whether attachments list which is output from trigger has items or not, if there are attachments , above condition becomes false and follows No branch. If there is no attachments, above condition becomes true and follows Yes branch.

     

    Hope this idea helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Anand3 Profile Picture
    26 on at

    Hi @trice602 

    Thanks for your response

    As Requested I am sharing the screenshot on how the flow ran when an email with no attachments was triggered.

  • Anand3 Profile Picture
    26 on at

    Hi @Nived_Nambiar 

    As you have mentioned, In the condition step i chnged the expression the Yes part is working fine but if an email comes without an attachment then the condition step itself it not executing,

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    So you are saying that when email comes with no attachments,the yes branch is getting executed instead of No branch ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Anand3 Profile Picture
    26 on at
    Neither yes or No branch are executing.
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Anand3 

     

    May be i got what is the error with your flow. I think you are still using apply to each and inside it you are using condition which i have shared. if yes, then current approach won't work. Because when no attachments, then nothing to iterate which makes condition action to skip. 

     

    So the design should be like this:

    Nived_Nambiar_0-1703784382523.png

     

     

    Hope this resolves your error !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Anand3 Profile Picture
    26 on at

    Now It is working as expected, so thanks @Nived_Nambiar for your help.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard