Flow (flagged e-mail => SPO) results in multiple list entries

Iron Contributor

I have created a Flow, which creates a SharePoint list entry from a flagged e-mail. It works as expected, except for one result. The SPO list item is duplicated several times. I have not been able to determine if the duplication occurs when I view the flagged e-mail regardless of device (possible), when I open Outlook in a new device (possible, but unlikely), or randomly (possible). One thing is certain: the source item in Exchange Online is not marked as having already been converted into a list item and so should not be converted again.

Any idea of the problem, or how to fix it?

3 Replies
Not sure about what’s causing the triggers and or multiple items but there should be some kind of message ID or unique identifer that is tied to the flagged item. You could then make a column and set it as unique values only so you cannot add multiples of the same flag. Or you could have the flow do a condition to check that the list doesn’t have an item with that ID the flow is running for already there and if so end the flow.

@ChrisWebbTechThose are both good ideas, thank you. I'm particularly interested interested in your second suggestion.

 

you could have the flow do a condition to check that the list doesn’t have an item with that ID the flow is running for already there and if so end the flow

 

How? Is there a resource you could point me to?

@JosephNierenberg 

There are a few out there, google up 'microsoft flow existing item Sharepoint list' and you'll get some results, but here is one I found, basically gives you the idea how to do it. Get list items, filter that with something like MessageID eq 'messageid' from the e-mail then you basically do a empty command I think could work, to see if any results returned to it, may have to use other method from articles but I just whipped this up off top of head. If it's true then create, else, do nothing. Should work theoretically. 

 

flow.JPG