
Announcements
I'm working on a Flow to verify our ticketing system is processing emails successfully. The service will occasionally stop working.
I think I have it mostly figured out, however, when I use the Condition of "List items Subject" contains "Email Subject", the result is always False.
Here are the steps I have:
- Trigger - Recurrence - Every 10 minutes
- Get Items - SharePoint List (Email Connectors) that contains the Email Address and Company of each Connector
- Apply to Each List item - Send email to Email Address in List, with a subject of "My Company/support@domian.com/UniqueUTCTimestamp
- Create a List item in (Email Connector Sent Log List) for each email sent that contains the email address and unique subject
- Now the flow Pauses for 2 minutes to wait for the New Ticket notification to be sent and received in my Flow Accounts Inbox
- Get Items - Email Subjects - From the Email Connector Sent Log
- Get Emails
This is the section that isn't working. It always comes back as false.
- Once I get the condition part working, it will send an email or Teams IM to the Internal IT team if a Connector has failed.
- Then it will delete all of the items in the "Email Connector Sent Log", then repeat in 10 minutes.
Any help would be greatly appreciated.
Thanks,
Shawn
Hi Shawn,
Can you verify this for me, or if not can you check this. Heck or skip this and redo based on my suggestion below and then you can do these steps.
1. Open the flow that ran.
2. Iterate through the Send Email Create Item and validate each Subject value etc that was written (according to the Input and Output of the Action). Compare that to the List to make sure you see them.
3. Go down to the 2nd Apply to Each. Walk through that and compare the Condition values (input/output) so you can see what it was comparing.
Suggestion:
Instead of looping through the Second get items, remove it. Only loop through the Get Emails. Then for each Email retrieve, do a List Items, with a Filter on the Subject Column. Then Have your condition simply check if you found a row or not.
This will remove a lot of Get Emails that are being duplicated for each Subject. Instead driving everything with a single Get Email loops and no redundant loops of the Get Items as you will only get back a single row each time.
Get Emails
List Items (Filtered by Subject from Email)
If there is a row then process it
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey