cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karenfield
New Member

Creating New Contact Records from Incoming Email

Hi

I'm new to the site and new to building flows.  What I have done so far is asked that for every email that arrives in my inbox (Outlook) that a contact record be created with the email address and the given name and it get stored in a "new contact" folder.  

 

What I am getting is multiples of the same address as many of the same people send emails throughout the day.  What I would like it to do, is compare the email address to all of the email addresses in my "new contact" file and if it is there, do nothing. If it is not there then create the contact record.

 

I would love to be able to pick up phone numbers, company names and addresses automatically, but will be satisfied if I can just get those two pieces of information.

 

If this problem has already been solved or there is a template for it please let me know.

 

Best Regards

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @karenfield ,

 

Perhaps you could try to configure Flow by referring to the following method.

 

  • Divide contacts into members of the organization and members outside the organization.
  • Personal information of Members within organization can be obtained through Get user profile action, but members of outside organization seem to only be able to save email addresses.
  • When receiving the email, use email address to determine if the current sender is already in contact list.
  • Use length() function to determine if there is a matching contact, and if not, create a new one.
  • Use Get user profile action to obtain personal information and configure two branches. The right branch can only be executed when Get user profile action fails.

Image reference:

35.PNG36.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

2 REPLIES 2

@karenfield 

Hi there!  So, to get all of the information (company, phone, so on) you'll probably need a 3rd party app.  Contacts + (Formerly FullContact) is one of my favorites because you can sync across multiple accounts, it grabs signatures, and has a pretty cool business card scanner.

Just getting the name and phone number is doable, but I don't know the expression to parse that out (especially since it isn't always uniformly presented).

I sketched something out that begins with

  • when a new email arrives
  • initializes a string variable (we'll need that later)
  • Gets all of the contacts then uses a condition to look for an instance when the eMail address in Contacts matches the From on the email.
  • This kicks off an Apply to Each loop because it is looking at each contact one at a time.  Don't panic.
  • If it finds a match, update the variable to the email address of the From.  If it doesn't, it leaves the variable as Null.
  • Outside of the "Apply to Each", we'll look to see if there's anything in the variable.  If there's something in there, then the contact existed and there's no need to do anything.  If it's blank, we add the email address and name (That's the expression I don't know, so I put the email address in both fields).
  • The Phone Number is required and you might not have that, so I put a bunch of 9's.

There was also this add-in for $15 USD that does the same thing.  Totally up to you.   

 

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

v-bacao-msft
Community Support
Community Support

Hi @karenfield ,

 

Perhaps you could try to configure Flow by referring to the following method.

 

  • Divide contacts into members of the organization and members outside the organization.
  • Personal information of Members within organization can be obtained through Get user profile action, but members of outside organization seem to only be able to save email addresses.
  • When receiving the email, use email address to determine if the current sender is already in contact list.
  • Use length() function to determine if there is a matching contact, and if not, create a new one.
  • Use Get user profile action to obtain personal information and configure two branches. The right branch can only be executed when Get user profile action fails.

Image reference:

35.PNG36.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,126)