Showing results for 
Search instead for 
Did you mean: 
New Member

Create expression to render an output, if the input matches a an item in a defined list of items

I’m using a Calendly Integration, which includes a value of “Event Assigned to Email” - this email corresponds with our Dynamics users.
When a Calendly event comes in, I want to create a Lead in Dynamics (which is working fine) - and then assign it to the Owner (who is the “Event Assigned to Email”
I tried passing the {{EventAssignedToEmaill}} - however it errord out. So I realized I need I ned to pass in the alphanumberic OwnerID / record id (not the email)
Thus I need to write an expression that maps Emails -> OwnerID/RecordID — which I have no idea how to do. 

If {{EventAssignedToEmaill}} = set value as ABC123 set value as DEF456 set value as HIJ789
No match set value as ______  (leave blank - don’t set any value)
ABC123 / DEF456 / HIJ789 = the Dynamics users OwnerID value
If someone could help me with this expression I would really appreciate it!
Thank you,
Community Support
Community Support

Hi @etanshapiro,


Thanks for posting.

So here you are working with Microsoft Flow? If yes, then please post back to let me know, I will then move this thread in Flow Forum category.


If here you are working with PowerApps for Dynamics 365, we could take use of Lookup function to find the corresponding OwnerID, take a look at the following example:

Working with Dynamics 365 lookup data in PowerApps





Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
New Member

Yes i am working with Flow - if you could move it that would be great, thanks!

Hey @etanshapiro,


Glad we were able to move you inquiry over to the Flow Forum!


Have you had a chance to apply @v-micsh-msft's suggestions to adapt your Flow?

If yes and you found that solution to be satisfactory, please go ahead and mark this thread as "Solved". 🙂


Happy Flowing,

-AT (Community Admin)

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,784)