Introduction
The Actions component of Ultimate Forms helps you add automation to your SharePoint without being a developer. With its numerous action types, you can accomplish many tasks, both inside and outside SharePoint.
Manage Exchange allows you to perform various operations in Microsoft Exchange from SharePoint.
- Create event - create Exchange events based on SharePoint list item properties.
- Update event - updates existing Exchange events with new information.
- Delete event - deletes Exchange events.
You can work with events in your own calendar, or, if you are an administrator, in other users' calendars as well. We provide support for multiple event properties, including attendees and All Day events.
Let's See a Demo
To demonstrate how the action works, I'm going to build a simple, but complete real-world system. We are going to implement a one-way sync between a SharePoint calendar list and an Exchange calendar.
We add, update or delete events in a SharePoint list. Our actions will automatically replicate these changes to Exchange. Basically we are setting up real time mirroring between SharePoint and Exchange events.
SharePoint List
Many of the columns we are going to be using already exist in the Calendar list of SharePoint. You can either use that list type or you can use a simple custom list.
Make sure your list contains the following columns:
- Title - single line of text
- Description - multiple lines of text
- Location - single line of text
- Start Time - date column with time option
- End Time - date column with time option
- Attendees - person column with multiple entries enabled
- Original Title - single line of text. We use this column to store the previous value of Title, so we can update changes in Title.
- Original Start Time - date column with time option. We use this column to store the previous value of Start Time, so we can update changes in Start Time.
We will use the combination of Title and Start Time as the unique identifier. Therefore we need the "original" values, so we can update these columns in Exchange as well. We will store the original values and pass them to the Update action to ensure we update the correct item.
Here is the suggested design for the list form. I used our Form Designer to implement it in just a couple of minutes.
Required Actions
We are going to be using 4 actions for it: 3 Manage Exchange actions and one Update list item action. But first, we need to make a small change in our SharePoint calendar list. We will create two new columns, that will help us perform the update in Exchange:
These are the actions we are going to be creating:
Note the fourth action, Store original values. This action will update the original value columns after running an update. This helps us ensure the values are always up-to-date for the next update.
NOTE: in Microsoft 365, you must be a Global Administrator to add the first such action in your tenant. Subsequent actions do not require you to be an admin. This is needed to grant access to Exchange so the app can create and update events there. Without granting the consent, you won't be able to save the action, as it won't have the necessary permissions to run.
New Event Action
This action runs on Item is added event in SharePoint and creates a new event in Exchange.
General Settings
Action settings
Update Event Action
For existing events, updates the Exchange event with new values from SharePoint.
General Settings
Action Settings
As you can see, we use original value to choose which event we want to update. This way even when we change the event title in SharePoint, we update the correct event in Exchange.
Delete Event Action
Deletes event from Exchange when we delete it from SharePoint
General Settings
Action Settings
Store Original Values Action
The only action that does not interact with Exchange. We use it to update our Original Title and Original Start Time columns, so they are ready for the next update.
As this action happens after the Update event action, we might have two different titles when updating the event in Exchange:
- The original title (the one that the event in Exchange still has).
- And the new title that was updated in SharePoint.
This action runs on Item is added and Item is modified events. We are also going to be using Conditions to only run the action when Title or Start Time actually change.
General setting
Action settings
- Conditions
Notice how we are using the "after change" condition here. It compares the current value of Title with itself (which is always true).
But it also compare the previous value of Title with the current value using the reverse operator. The reverse operator in this case will be not equals. This way the condition will only be true when the value actually changed. Otherwise the previous value will be the same as the current value.
And this is it, now any change made to the events in SharePoint will be reflected in the Exchange events!
Conclusion
Ultimate Forms makes it easy to integrate SharePoint with a variety of external applications. In this article I showed you how to synchronize event information found in SharePoint list with events in Exchange. The same configuration is available both in Microsoft 365 (SharePoint Online and Exchange Online) and on premises. The SharePoint/Exchange integration is a simple but powerful tool in your SharePoint toolbox.