web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Checking email sender ...
Power Automate
Answered

Checking email sender against SharePoint list

(0) ShareShare
ReportReport
Posted on by 4

Hi, I am trying to create a flow that will check if the sender of an email matches any entries SharePoint list of email addresses and domains.

 

I am having trouble with the Apply to Each element, running this:

 

lightspy28_1-1611884258932.png

 

Give me the error:

 

Unable to process template language expressions for action 'Condition_2' at line '1' and column '29386': 'The template language function 'contains' expects parameters of matching types: a dictionary and a key (string), an array and a value (object), or a string and a substring. The provided types 'String' and 'Object' are incompatible. Please see https://aka.ms/logicexpressions#contains for usage details.'.

 

ActionFailed. An action failed. No dependent actions succeeded.

 

 

This method below runs, but always triggers "No", despite the email address being on the list.

 

lightspy28_0-1611884007201.png

 

I must be missing something in how the "Apply to Each" function works with SharePoint lists...help!

Categories:
I have the same question (0)
  • Verified answer
    Mira Ghaly Profile Picture
    11,413 Moderator on at

    @lightspy28 

    I suggest for troubleshooting is inside your apply for each loop , add to compose data operations , one add to it the Title and the other one the From, You can then check flow history to understand what is going on.

     

     

  • lightspy28 Profile Picture
    4 on at

    Thank you, that did shed some light on the issue.  The second screenshot was actually working properly, but my logic was incorrect in that I forgot it was really applying to each entry in the List, so each time an entry didnt match the From address, it would trigger a No.  I changed the apply to each instead increment a variable, and then perform a standalone action based on the condition of the variable.

     

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard