Skip to main content

Notifications

Power Automate - AI Builder
Answered

When an event is added, updated or deleted

Posted on by 4
Hello,
 
I would like a flow that updates a SharePoint list when an event is added, updated or deleted to an outlook calendar, no duplicates. I tried a basic flow add item but every time it cycles an item is duplicated.
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 317 on at
    When an event is added, updated or deleted
    Try the following approach:
    • Trigger on Outlook Calendar Event:  Use the "When an event is added, updated or deleted" trigger in Power Automate for your Outlook calendar to monitor event changes.

    • Check for Existing Item in SharePoint:  Before adding or updating an event, use the "Get Items" action to query the SharePoint list and check if the event (based on a unique identifier, like the event ID) already exists.

    • Condition to Prevent Duplicates:  Add a Condition to check whether the event already exists in the SharePoint list:

      • If the event exists: Update the existing list item with the new details (use the Update Item action).
      • If the event does not exist: Add a new item to the list (use the Create Item action).
    • Handle Deletion of Events:  If the event is deleted, query the SharePoint list to find the corresponding item using the event ID, and then use the Delete Item action to remove it from the list.

    • Avoiding Duplicates: Ensure the SharePoint list has a column (e.g., Event ID) that uniquely identifies each calendar event.

      • Use this unique identifier to check for existing items in the SharePoint list before adding new entries.
    Pls let me know if you need more details. 
  • Verified answer
    FLMike Profile Picture
    FLMike 28,855 on at
    When an event is added, updated or deleted
    Hi
     
    This is pretty flimsy requirements....
     
    But what you need to do is this
     
    Make sure in your sharepoint list, you have a column for the Event ID, if not add it
    NOTE: with only 1 list, and you want no duplicates, you will NOT have an actual history of changes, you will simply have the current state based on whatever triggered.
     
    if you want current state, and ALSO history, you need 2 tables.
     
    1) When the event is added, updated, or deleted let it trigger
    2) grab the Event ID from the trigger
    3) Add a Get Items sharepoint action
    --add a filter that uses the Outlooked Event ID to get it to either 1 or 0 rows (assuming it doesn't exist)
    4) Add a condition
    --set the left side to length(Get Items action Name here) is equal to 1
     
    In the Yes side,
    do an Update Action since it already exists
     
    In the No Side
    do a Create Item since it doesnt
     
    Done.

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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Tuesday Tip #2 Global Search…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,008

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,531

Leaderboard