Hello All,
I'm using the helpdesk template on SharePoint and I've created a flow here if someone emails our shared mailbox, it generates a ticket. I've extended that flow to add it where if someone emails/replies back to that same email, it doesn't generate another ticket/item on the list. I can't seem to know what I'm doing wrong as it's not showing any errors but it's not producing the results wanted as it's still generating more tickets on the same email thread.
Initially before a new item/ticket is generated in the list, it would check for the "message id" that was extracted and if the returned amount is 0, it'll proceed with a creating a new ticket/item. If not, the flow ends but I may see if it can just add it as a comment.
Below is everything I have.
For "Get Items"

For "Create item"
