Share via

How to keep two Sharepoint Lists (ideally incl attachments) in sync using PowerAutomate?

Anonymous
2021-02-18T13:12:35+00:00

I have a list in SharePoint and I want to create sublists based on a condition that would only allow certain people to see certain items. I can do this on Create Items but also need this to work when the list is modified. Any thoughts, please.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2021-02-19T14:32:20+00:00

Hi Robert,

This post will talk about attachment sync. The flow will do things below:

  1. Get original list item attachment name and content.
  2. check whether there's any existing attachment in list item that copied from original list.

(1) if yes, deleting existing attachments then add new attachments copied from original list.

(2) if no, directly add new attachments copied from original list.

Get attachments

Site Address: the original list site

List Name: the original list name

ID: dynamic ID from “When an item is created or modified”

 Image

After that, add action “get attachment content”

Site Address: the original list site

List Name: the original list name

ID: dynamic ID from “When an item is created or modified”

File Identifier: dynamic ID from “Get attachments”

 Image

Then add “condition”

Choose a value: dynamic “has attachments” from “Update item”.

“is equal to”

“true”

 Image

Then set condition yes to delete existing attachments and add new attachments.

Set condition no to add new attachments directly.

 Image

Regards,

Rena

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-02-22T09:52:44+00:00

    Hi Rena,

    Thank you so much for taking the time to do this. I'll give it a test.

    Rob

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-02-19T14:57:43+00:00

    Hi Robert,

    As the flow above is automated cloud flow that will run automatically, so they will really copy and sync all items to another list.

    If you don't want some items to be copied, you may add some other condition in the middle of your flow. For example, you can add a new column in your original list, type value "sync" or "no sync". the update actions only will do when the column value is equal to "sync".

    Thanks,

    Rena

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-02-19T13:32:40+00:00

    Hi Robert,

    Based on my test, the best way is to set two Automate flow for “create new item” and “update existing item”.

    For “create new item”, you just need to use

    trigger “ when an item is created

    Action “create item”.

    Below I will describe the way how I set to “update existing item”.

    The trigger: When an item is created or modified. Just set to get the original list is ok.

    Image

    The action: Update item.

    In Site address and List Name, select the list that you want to get copied data.

    In  ID, use the dynamic value to select the “ID” from “When an item is created or modified”. this settings can help you only update item match the same ID.

    In Title or other column, set individual value from dynamic value of “When an item is created or modified”.

     Image

    If you want to update attachment, you may need to add "get attachments", "get attachment content", "delete attachment", "add attachment" with "condition"

    Regards,

    Rena

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2021-02-19T13:05:54+00:00

    Hi Robert,

    There's action "update item" as well. Please allow me some time to test whether there's any possible solutions for you. I will post back soon.

    Thanks,

    Rena

    Was this answer helpful?

    0 comments No comments