cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Collector
Kudo Collector

Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

Hi all, 

 

I am beginning to try out some integration with Salesforce using Premium connectors. 

 

In my first exercise, I want to just list all Salesforce users with a Username that matches between SF and O365. 

 

I have created 3 variables: 

 

One integer to count all Users in SF. 

One integer to count all matches. 
One string to concatenate all Usernames that matched, one per line. 

 

Send an email to myself with all 3 variables in the body.

 

In my first exercise, I just listed all usernames and everything worked perfectly.

 

In my second exercise, I used a Flow Conditional with the rule: 

Salesforce Username is equal to username@contoso.com (email omitted for privacy). This worked perfectly. 

Advanced mode: (email omitted)

@equals(items('Aplicar_a_cada')?['Username'], 'username@contoso.com')

My variable counting matched resulted in 1 match, which is what I expected. 

 

In my third exercise, I changed the 'equal to' to 'ends with', and used only my domain name.

Advanced mode: (domain omitted)

@endswith(items('Aplicar_a_cada')?['Username'], '@contoso.com)

 

This yielded no matches. The variable to count matches stood at 0 and no emails were listed. 

 

I can't understand why it had this result. Perhaps it needs a special syntax? 

 

 

 

 

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

Hi @TiagoFreire,

 

I find that you are missing a single quote in your expression,

Please modify the expression to:

@endswith(items('Aplicar_a_cada')?['Username'], '@contoso.com')

Best regards,

Alice

Kudo Collector
Kudo Collector

Re: Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

I double checked that. the single quote was missing on this post but not on the flow code. 

Flow wouldn`t even save if there was a syntax error. 

 

The flow code runs, but does not yield any results. 

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (10,120)