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 / Power Automate Flows w...
Power Automate
Suggested Answer

Power Automate Flows work only sometimes

(0) ShareShare
ReportReport
Posted on by 18
Created power automate flow for when an email comes into a shared inbox.
The flows works and creates the file in SharePoint some days and others it doesn't work. It runs but does not work.
 
The flow is supposed to identify the email that is sent daily, that has a certain subject name and then identify the correct attachments and save those attachments in SharePoint.
 
It works and then doesn't work.
 
Not sure why and what's going on... Does anybody have any suggestions? 
 
Thank you for you time.
RGs,
Steve
Categories:
I have the same question (0)
  • David_MA Profile Picture
    13,850 Super User 2026 Season 1 on at
    This will not be too helpful, but I would do the following:
    • Create a log to track when it works and doesn't work.
      • Check to make sure the subject and filename meets one of the two conditions.
      • The e-mail arrived in the inbox and was not moved to another folder by a rule.
    • When you say it runs but doesn't work, what didn't work?
      • Is there an error message?
      • Which action/actions didn't work?
      • When it runs but "doesn't work" is it because it went down the false side of the condition. Technically, that would be considered working.
    • If it runs and goes down the yes side, is the file not getting created?
    • The path and filename are rather long. I don't think it exceeds the limits but try simplifying it to see if that resolves the issue. You can read about this limitation at https://learn.microsoft.com/en-us/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits#file-size-and-file-path-length and take a look at the invalid filename link referenced there as well. I don't think that is the issue either since you have a condition on the filename, but I don't know what expression you are using to generate the last part of the filename. If the expression were the issue, it should fail every time.
    • Does the e-mail arrive more than once a day? If so, will your formatDateTime expression prevent a duplicate file from being created?
    Note: you should update the image you posted and blackout the e-mail address in the Outlook action and your company's SharePoint domain in the create file action.
  • SL-24071327-0 Profile Picture
    18 on at
    First thank you for the email tip :-)
     
    Answers to your questions:
     
    • When you say it runs but doesn't work, what didn't work? So the flow runs but doesn't create the SharePoint file.
      • Is there an error message? no errors
      • Which action/actions didn't work? creation of the files in SP
      • When it runs but "doesn't work" is it because it went down the false side of the condition. Technically, that would be considered working.
    • If it runs and goes down the yes side, is the file not getting created? exactly - it runs down the yes but doesn't create the file - like it didn't meet the conditions
    • Does the e-mail arrive more than once a day? If so, will your formatDateTime expression prevent a duplicate file from being created? Note: you should update the image you posted and blackout the e-mail address in the Outlook action and your company's SharePoint domain in the create file action. The email arrives once a day
     
    Appreciate your response.
  • SL-24071327-0 Profile Picture
    18 on at
    adding run history:
     
  • David_MA Profile Picture
    13,850 Super User 2026 Season 1 on at
    Can you go to a successful run where the file was created and share a screen shot of the create file action, and then do the same for one where the file was not created?
  • SL-24071327-0 Profile Picture
    18 on at
    Thank you for the reply.
     
    Please see below: (hope this is what you were looking for)
     
     
  • Suggested answer
    David_MA Profile Picture
    13,850 Super User 2026 Season 1 on at
    Yes, that is what I was looking for. Based on the screen shots your flow is working correctly. The one where you think it is not working is going down the false path, which indicates the condition was not met. I would add a Compose action to the false side of the condition and insert the values you use in the condition into the compose action. This way, you can see what is being returned so you can adjust the condition.
  • SL-24071327-0 Profile Picture
    18 on at
    Thanks for the response.
     
    However, I'm not quite sure I understand. 
     
    If I add a compose to the false side, 
    I am unable to add the insert all these values that are in the Condition, into the Compose?
     
     
    What am I not understanding?
  • David_MA Profile Picture
    13,850 Super User 2026 Season 1 on at
    Re: "However, I'm not quite sure I understand. If I add a compose to the false side." You want to add the subject and name values used in conditions to the Compose action. This will allow you to see the values when the flow runs so you can check it against your conditions and adjust as needed.
  • SL-24071327-0 Profile Picture
    18 on at
    Hi ok here are the results : 
     
    If I understand correctly, the flow is searching exactly what is in the output.
    Is that correct?
  • David_MA Profile Picture
    13,850 Super User 2026 Season 1 on at
    Looking at the results, it looks like it meets your condition. I can see your frustration. Let's try a different approach to the condition. Try this instead:
    The two expressions are:
    1. and(contains(item()?['name'],'Call Report.csv'), contains(triggerOutputs()?['body/subject'],'Alright Reports'))
    2. and(contains(item()?['name'],'Call report.csv'), contains(triggerOutputs()?['body/subject'],'Alright Reports'))
    This worked for me:
     
    If you wanted to make it simpler, you could revise the expressions to lowercase. For example: and(contains(toLower(item()?['name']),'call report.csv'), contains(toLower(triggerOutputs()?['body/subject']),'alright reports'))
     
    You would then need just one condition.
     

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
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard