cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bukester
Frequent Visitor

Outlook MessageId is NOT unique

Hello,

I have setup a flow to log (among other things) each email to a log table in on-premises database. This ran for some time and for the most part worked. I am developing this further with the understanding that the MessageId is a unique value, but I am finding that is is NOT unique. 

If I execute :

SELECT * FROM audit.EventLog WHERE SourceId IN (
SELECT
[SourceId]
FROM [audit].[EventLog]
GROUP BY SourceId
HAVING COUNT(*)>1
)
AND sourceid='AAMkAGI4ZGQxODM3LTE1MTktNDlhOS05OTY1LThjNjBhZTExNjIwYwBGAAAAAAAbkuZPGNHBTY-o7TpPuklBBwBhG_qNiCDrR6haRvwuqbf4AAAAAAEMAABhG_qNiCDrR6haRvwuqbf4AAH8bhXXAAA='
ORDER BY SourceId,EventDateTime

I get two records (there are many instances of dups)

Duplicate MessageId.png

In this case, several hours apart and there is no connection between the two messages. 

 

Is there a function available in flow for me to unique-fy the message? 

 

The root problem I am trying to solve is - some emails we receive are the same name every time. Its not datestamped etc. So I need to have a name that is unique and of course the original name to know how to handle the file (pdf rip or parse csv, excel etc)

 

 

2 REPLIES 2

@Bukester - Have you already considered concatenating the ID and the Date/Time into a new key field?  Seems like that would always be unique, no?

 

-Ed-

v-zhos-msft
Solution Sage
Solution Sage

Hi @Bukester ,

As the pic shown, you find two emails with the same 'Message Id'.

Can you find the corresponding emails in your Outlook?

Please check whether the two emails is the same one.

I think the 'Message Id' is unique.

You can use the below flow for a try, checking whether you can get two different emails with the same 'Message Id'

Capture10.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,535)