cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RSwork
Regular Visitor

Flow when email with attachment arrives, create file in SharePoint library stopped creating file suddenly

Hi All,

I created a flow to monitor a shared mailbox and when and email with an attachment from specific email address arrives the flow uploads the attachment to the SharePoint library and send notifications that a file with IDxx and filename xxxx has been uploaded.

The specific emails (with an attachment) is received once a day, so the flow runs once a day. The attachment is an .xls file.

 

The flow worked fine while testing and now after I have published the flow live, it run 12 times doing what is supposed to do.

Suddenly today the flow should've uploaded the 13th file, but it did not happen, although the flow result is success at first part.

 

The flow history showed that flow run OK  - no error messages.

But when it came to "Apply to each" action - uploading the attachment and then sending the notification after that, those actions are dimmed and no results:

 

Upload attachment.PNG

 

I tried to resend the same email with the attachment again to the shared mailbox and the same result - did not create the file.

 

I uploaded the attachment manually and it uploaded successfully to the SP document library- so it is not the file the problem.

 

From previous history of the flow I see that there are 2 results per flow run within couple of minutes - one picks up the email with the attachment, second creates the file on Sharepoint from attachment:

Upload attachment 1.PNG

 

First flow result:

Upload attachment.PNG

 

And second part result:

Upload attachment 2.PNG

"Create file" raw inputs:

Create file Inputs:

{
    "host": {
        "connectionReferenceName""shared_sharepointonline",
        "operationId""CreateFile"
    },
    "parameters": {
        "folderPath""/InfoPacks",
        "name""2021-07-24T10:30:15+00:00_InfoPack.xls",
        "body""0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAA..........."
    }
}
 

Today, there is just the first part run in the history (see above). The second part did not happened - as per screenshots above.

 

I'm not sure what happened or aware if anything happened so the flow suddenly to stop creating the files in SharePoint - nothing has changed since before, no error messages ( I have an error notification set up in the "If no" branch). And why it run OK 12 times and then stop?

 

Any help, pls?

7 REPLIES 7
eliotcole
Impactful Individual
Impactful Individual

Not sure based on this, but you might want to look at SharePoint errors in the admin console, as they might hold more information on this.

 

We might need to see more of the flow, what the full conditions, and failure captures are. Additionally, is the user account that you used to upload the file to SharePoint the same account that runs the flow?

Hi @eliotcole - thanks for looking.

I cannot see any errors in SharePoint Online. The service account running the flow is a site admin and site owner and also co-owner of the shared mailbox - so permissions should be OK.

 

Here how the flow is built:

Trigger:

Trigger.PNG

 

IsFromFilterApplied variable:

RSwork_0-1627371442433.png

Condition to apply "From" filter:

RSwork_1-1627371592982.png

 

"If yes" side:

RSwork_2-1627371697887.png

 

If the email is from specified email address in the condition above then "Apply to each" create the file and send notification:

RSwork_3-1627371921039.png

Yesterday it failed on Create file action and did not send the notification after that.

The flow should be triggered again today at 11:30-ish today. will monitor it again.

 

Here is the history again:

RSwork_4-1627372312464.png

RSwork_5-1627372752539.png

 

Pls let me know if you need any more info.

Thanks again

 

 

RSwork
Regular Visitor

Here is the SharePoint Online document library:

RSwork_0-1627374853973.png

 

Powerplatform01
Post Patron
Post Patron

Hi @RSwork ,

You can watch this video to resolve your issue,

https://youtu.be/GA_f5GX5H-Q

Please subscribe and like the video if it's resolve your issue

eliotcole
Impactful Individual
Impactful Individual

That's some good info, @RSwork , thank you!

 

I'll look in to it soon, and post back. 👍

Hi again @eliotcole ,

Funny bit is that today at 11:34 the flow run as it should, as there was a new email send to the shared mailbox with the required attachment - and guess what - it run successfully and uploaded the attachment as a new file on SharePoint site.

How bizarre?!

Still not sure why it failed to create that file yesterday... 

Hi @Powerplatform01 ,

Thank you for pointed to that video.

I have created my flow in a more simple way, but with conditions that the flow will process emails sender from specific sender, with specific keywords in subject line and also must have attachments.

Ans it worked great including today - except yesterday and still unable to find out why.

Best,

RS

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,913)