cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

My flow keeps failing and I can't work out why

Hi there,

I have a flow set up to create a sharepoint item and attach an email, whenever an email arrives. It works sometimes and not others. Every time it fails, I get this error. Below is a screenshot of my flow as well.

 

Can anyone help me?

 

Thanks,

Mel

Flow fail.pngFlow step 4.PNGFlow step 3.PNGFlow step 2.PNGFlow step 1.PNG

6 REPLIES 6
v-yamao-msft
Community Support
Community Support

Hi @Anonymous,

 

Thanks for providing the detailed error message.

From the screenshot, it seems action Add attachment2 is being used to save email attachments to the list. While the error message says that the provided value is of type ‘Null’. Please make sure the email arrives does contain attachments.

If an email without attachments arrived, the dynamic contents Attachments Name and Attachment Content will return null value, then the error message would be returned.

Please enable Yes for both Has Attachment and Include Attachments fields so that the flow would be only triggered when an email with attachments arrives.

I have made the following test, please check it for a reference.

1.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks Mabel. I noticed yesterday that it looks like the flow will still create a sharepoint item and attach the email, even when there are no attachments and that's exactly what I want to happen. So from what I understand of what you've said below, it's saying its 'failed' because the email doesn't actually have any attachments, yeh? I want all emails to go into the list, so if that's the reason, then it's not actually a problem!

Hi @Anonymous,

 

Thanks for updating.

I have reproduced the issue. It seems that when an email with more than 2 attachments arrives, it will return the error message.

Please check the following configuration for a reference. I assume that it will work for you.

1.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mabel,

My flow doesn't look like yours so I'm a bit confused. I just tested it by sending an email to the shared mailbox with 2 attachments. The flow says that it's failed, but when I check the SharePoint, the email is there and so are both the attachments!

My flow

Step 1: When a new email arrives in a shared mailbox

Step 2: Create item in SharePoint

Step 3: Export the email

Step 4: Add attachment

Step 5: Add attachment 2Flow step 1.PNGFlow step 2.PNGFlow step 3.PNGFlow step 4.PNG

Anonymous
Not applicable

Whilst I've got you Mabel, how do I make the string return the Melbourne, Australia time usig the UTC expression below? I want the name of the SharePoint item to be the time the email was received, is there another way to get that?

UTC.PNGFlow step 2.PNG

Hi @Anonymous,

 

Please try to use the convertTimeZone function which can help convert a timestamp from the source time zone to the target time zone.

Please check more details about the function at here:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#convertTimeZone 

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,984)