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 / Power Automate - Creat...
Power Automate
Unanswered

Power Automate - Create/Update Outlook Contacts from Sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all,

 

I am looking to create a flow that takes a sharepoint list, and creates contacts in outlook. When that sharepoint is updated, I want those contacts to be updated as well.

 

So far - the flow works to create contacts. However, I am having issues with the "Condition." Anytime a phone number, address, name, anything updates in sharepoint - I want the contact to be updated as well.

 

What should these conditional statements look like?

Please see below. 

Querty1234_0-1642041529815.png

 

Categories:
I have the same question (0)
  • Ramspevi Profile Picture
    110 on at

    Hello

     

    I would suggest you consider two flows to handle this. One for creating a contact one for updating it. 


    1. For creating you can remove the condition from your existing flow and just keep the 'Create contact' - Action. 

    2. The flow to update the contact starts with the SharePoint trigger: 'When an item is created or modified'. 

    This will fire when an item is created which you don't want bc you do that in flow 1. There are two solutions to this problem. 

     

    A) make a condition after the trigger which compares the creation date with the last edit date if there are equal you terminate the flow. 

    B) set a trigger condition within the trigger which achieves the same.

    Hope this helps

  • Querty1234 Profile Picture
    Microsoft Employee on at

    @Ramspevi 

    Thank you for your reply - that helps a lot. However, there is no creation date or last edit date option. Is this what you were thinking?

     

    Additionally - if someone edits their contact 3 different times, the flow would need to update a contact 3 times as well.

    Querty1234_0-1642127441831.png

     

    I unfortunately cannot have two separate flows, they need to be in this one.

     

    Thanks in advance.

  • Ramspevi Profile Picture
    110 on at

    Hello!

    Modified should provide you with a timestamp (string) of the last time the item was modified. 

    I just recently switched to english as the default language in Power Automate. 🙂 

    Hope this helps. 

    Consider markign my response as solution if your problem is resolved so it is easier to find for others.
    Like won't hurt as well 🙂

  • Querty1234 Profile Picture
    Microsoft Employee on at

    Hello Sir, thank you for your response. There is only one "Modified" string. Am I comparing "modified" to "modified?"

     

    Querty1234_0-1642203206934.png

     

     

     

    Additionally, this flow needs to run at a specified time interval (once a week). If it does - then each contact will be created again. There will be multiple of the same contact.

     

    I need the flow to:

    1) Check to see if a contact exists. If not, create.

    2) If a contact exists, check to see if it has been updated. If yes, update contact.

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    I think what you are missing is a Get Contacts to see if the contact already exists in Outlook.  Something like this where I am checking for a contact with the same DisplayName as the one in the SharePoint list.  If the array returned is greater than 0, then the Contact already exists.  You can then use the ID from the first record returned to update that contact.  Right now you are trying to use the ID of the SharePoint listitem, which won't work.  If it is 0 then just create a new contact the way you are now.

    image.png

  • Querty1234 Profile Picture
    Microsoft Employee on at

    Sir,

     

    Thank you. That helps. I'm a little confused on:

    1) Are you initializing a variable "outputs" as everything from sharepoint?

    2) What is your f(x) length function? I am using "length(outputs('Get_items_from_Sharepoint')?['body/value'])"

    Querty1234_0-1642374832214.png

     

    Every time I attempt to Filter, it automatically applies "apply to each" to my step, and can only filter by the sharepoint values like this ->

    Querty1234_1-1642377519234.png

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    1) The outputs in my screenshot is there because I don't have the SharePoint list you are pulling from.  For you that would be the display name of the contact, wherever that is stored in you SharePoint list.

    2) The length() function is to get the length of the array returned by Get Contacts (V2).  So, it would be

    length(outputs('Get_contacts_(V2)')?['body/value'])

    3) You are getting the apply to each loop because your Get items in SharePoint returns an array of list items.  Even if you only have one item it's still in an array. It looks like you are processing the whole list of contacts in SharePoint each time the flow runs.  So, each contact will need to be processed inside a loop.

  • Community Power Platform Member Profile Picture
    on at

    On action Create Contact (V2), what do we do enter for ID?

     

    I am leaving it blank in hopes that Outlook will automatically set it, but the action is failing with error "ID is malformed."

     

    Any help much appreciated!

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    Please post this as a new question in the forums.  You'll get more replies that way and it will be easier for others to find the answer later.

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard