cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Field
Level 8

Personalised list sync with contacts

Hey guys, i have 2 lists on sharepoint, Contacts (Made with the app contacts), and users (Made with personalized list).

 

I want to create a flow that would add another user to the contacts when it was added on the personalised list, and same goes with deleting and editing.

 

I made an simple flow with all of the three, but it doesn't work out, it just keeps adding and ignores the other two.

 

Any help?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Personalised list sync with contacts

Hi @Field,

 

Could you please share more details about your two SharePoint lists?

Do you want to add/update/delete the user in your Contacts list when a user is add/updated/deleted in your personalized list?

 

If you want to delete the user in Contacts list when a user is deleted in your personalized list, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

The "When an item is deleted" trigger is not supported in SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

If you want to add/update the user in Contacts list when a user is added/updated in your personalized list, please take a try with the following workaround:

I have created a Personalized list on my side and the data structure of it as below:18.JPG

Note: The Contacts list has same data structure with the Personalized list. The ContactName column, Email address column and the Mobile Phone column are all Single line of text type column.

 

I assume that each Contact has a unique email address, please take a try with the following workaround:

  • Add a "When an item is created or modified" trigger, specify Site Address and List Name set to the Personalized list.
  • Add a "Get items" action, specify Site Address and List Name set to the Contacts list.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['Email_x0020_Address'], triggerBody()?['Email_x0020_Address'])
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Filter_array'))
  • Within "If/yes" branch of Condition, add a "Create item" action, specify Site Address and List Name set to the Contacts list. These custom columns in my Contacts list are set to corresponding dynamic contents of the trigger.
  • Within "If/no" branch of Condition, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Update item" action, specify Site Address and List Name set to Contacts list, Id field set to following formula:
item()?['ID']

Title field set to following formula:

item()?['Title']

These custom columns in my Contacts list are set to corresponding dynamic contents of the trigger.

 

Image reference:19.JPG

 

20.JPG

The flow works successfully as below:21.JPG

 

22.JPG

 

 

If you want to delete the user in your Contacts list when a user is deleted in your Personalized list, you could consider take a try with the following workaround as an alternative solution:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name set to Contacts list.
  • Add a "Apply to each" action, input parameter set to output of "Get items" action.
  • Within "Apply to each" action, add a "Get items 2" action, specify Site Address and List Name set to Personalized list. Then add a "Filter array" action, From set to output of "Get items 2" action, Click "Edit in advanced mode", type the following formula:
@equals(item()?['Email_x0020_Address'], items('Apply_to_each')?['Email_x0020_Address'])

Add a "Condition" action, click "Edit in advanced mode", type the following formula:

@empty(body('Filter_array'))

Within "If/yes" branch of Condition, add a "Delete item" action,specify Site Address and List Name set to Contacts list, Id field set to ID dynamic content of the "Get items" action.

 

Image reference:23.JPG

 

24.JPG

The flow works successfully as below:25.JPG

 

 

 

 

 

Best regards,

Kris 

 

 

 

Community Support Team _ Kris Dai
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Personalised list sync with contacts

Hi @Field,

 

Could you please share more details about your two SharePoint lists?

Do you want to add/update/delete the user in your Contacts list when a user is add/updated/deleted in your personalized list?

 

If you want to delete the user in Contacts list when a user is deleted in your personalized list, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

The "When an item is deleted" trigger is not supported in SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

If you want to add/update the user in Contacts list when a user is added/updated in your personalized list, please take a try with the following workaround:

I have created a Personalized list on my side and the data structure of it as below:18.JPG

Note: The Contacts list has same data structure with the Personalized list. The ContactName column, Email address column and the Mobile Phone column are all Single line of text type column.

 

I assume that each Contact has a unique email address, please take a try with the following workaround:

  • Add a "When an item is created or modified" trigger, specify Site Address and List Name set to the Personalized list.
  • Add a "Get items" action, specify Site Address and List Name set to the Contacts list.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['Email_x0020_Address'], triggerBody()?['Email_x0020_Address'])
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Filter_array'))
  • Within "If/yes" branch of Condition, add a "Create item" action, specify Site Address and List Name set to the Contacts list. These custom columns in my Contacts list are set to corresponding dynamic contents of the trigger.
  • Within "If/no" branch of Condition, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Update item" action, specify Site Address and List Name set to Contacts list, Id field set to following formula:
item()?['ID']

Title field set to following formula:

item()?['Title']

These custom columns in my Contacts list are set to corresponding dynamic contents of the trigger.

 

Image reference:19.JPG

 

20.JPG

The flow works successfully as below:21.JPG

 

22.JPG

 

 

If you want to delete the user in your Contacts list when a user is deleted in your Personalized list, you could consider take a try with the following workaround as an alternative solution:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name set to Contacts list.
  • Add a "Apply to each" action, input parameter set to output of "Get items" action.
  • Within "Apply to each" action, add a "Get items 2" action, specify Site Address and List Name set to Personalized list. Then add a "Filter array" action, From set to output of "Get items 2" action, Click "Edit in advanced mode", type the following formula:
@equals(item()?['Email_x0020_Address'], items('Apply_to_each')?['Email_x0020_Address'])

Add a "Condition" action, click "Edit in advanced mode", type the following formula:

@empty(body('Filter_array'))

Within "If/yes" branch of Condition, add a "Delete item" action,specify Site Address and List Name set to Contacts list, Id field set to ID dynamic content of the "Get items" action.

 

Image reference:23.JPG

 

24.JPG

The flow works successfully as below:25.JPG

 

 

 

 

 

Best regards,

Kris 

 

 

 

Community Support Team _ Kris Dai
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
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,431)