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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Automatically create a Contact to resolve an unresolved email address

(0) ShareShare
ReportReport
Posted on by 721

Is there a way to automatically resolve an unresolved email address, either programmatically or via a workflow/power automate?

For example, if you enter an unresolved email address into the To/CC/BCC field on an email and click save, it automatically creates a new Contact for that email address?

Looking for a way to avoid having to manually resolve email addresses. 

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Automatically create a Contact to resolve an unresolved email address

    Hi Inksrm,

    You can create a flow to achieve it, the following is the overview of the flow. (In my example, the field that insert unresolvesd email address is ‘to’ field)

     pastedimage1602662988510v1.png

    Here are detailed steps of the flow.

    1.Go Power Automate(https://us.flow.microsoft.com/en-us/ ) to create an Automated flow.

    pastedimage1602663021491v2.png

     2.Create the Trigger event – in this case I have set the trigger to fire when an Email record is created.

     pastedimage1602663029197v3.png

    3.Add ‘compose’ step, it can get ‘to’ field value of the email created.

     pastedimage1602663235190v4.png

    4.Add ‘compose’ step, it can remove ‘;’ symbol from the value.

    replace(outputs('Get_To_field_value'),';','')

    pastedimage1602663570391v5.png

    5.Add ‘List Records’ step, retrieve contacts records to check that the address inputed in the created email exists in the contact records.

     pastedimage1602663733540v6.png

    6.Add ‘compose’ step, get contact counts of the previous step.

    length(body('List_records')?['value'])

    pastedimage1602663860598v7.png

    7.Add ‘condition’ step, if count is 0, go ‘Yes’ branch.

    pastedimage1602664029647v8.png

    In ‘Yes’ branch, do this steps:

    (1) Add ‘compose’ step, intercept the string before the @ symbol in the address field as contact name, also you can set contact name with the value you need.

    split(outputs('Remove_semicolon'),'@')[0]

    pastedimage1602664157066v9.png

    (2) Add ‘Create a new record’ step, create a new contact with the name and the email address.

     pastedimage1602664290524v10.png

    8.Save and test the flow.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 74 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans