How to send email if the count of a list equals to one?

I have a list of departments (IT,HR,Business)

When they send in a report, they will be added into the list again (IT,HR,Business,HR)

For departments with only 1 count, I will send an email to remind them to send in a report.

I have tried using dataTables but when i compare the ListOfDepartments with SubmittedDepartments, it will send to all departments as the rows dont align.
I have tried using list and checking the count, but it does not send anything.

Please help. Thank you.

@angelico_mdc,

Try this approach.

Initialize and Collect Data:

Maintain two lists: ListOfDepartments (all departments) and SubmittedDepartments (departments that have submitted reports).

Update the Lists:

Every time a report is received, update the SubmittedDepartments list.

Identify Non-Submitted Departments:

Use a For Each loop to iterate over ListOfDepartments.
Inside the loop, use a condition to check if the department is present in SubmittedDepartments.
If a department from ListOfDepartments is not in SubmittedDepartments, send a reminder email.

Send Reminder Emails:

Use the Send Outlook Mail Message activity to send reminder emails to departments that have not submitted reports.

LLM helped me to write this but it’s validated by me