Purpose

Some of our campuses want to have a master calendar in Outlook that automatically includes Reservations from our Room Management calendar.  I tried to use the recipe for iCal Feed using execute commands, and for some reason, our Rock instance crashes when we use them.  So instead, using a  webhooks API, I created an ical feed that can be added to Outlook.  I am sure this will work in Google Calendar or any other as well, although I will say I haven't tested anything other than Outlook.  The way the campus wants this to work is to have one person own the calendar and then share it with the rest of the campus staff. 

Note

All of our Room Named Locations in Room Management are under a parent location that is the campus or building.

Steps

  1. Create an API From Lava for room reservations
  2. Create a page to share the links to the APIs
  3. Add the Calendar to Outlook and Share

Create an API From Lava for room reservations

The steps to create an API from lava come from this lava reference page if you need any other information.

  1. Go to Admin Tools > General Settings > Defined Types and find the defined type Lava Webhooks.
  2. Create a new defined Type.  I gave mine the Value of /CalendarFeed and a Method of GET (They only need to see the information)
  3. Add the SQL to get a list of room reservations under the parent location
  4. Screenshot_2023-11-29_072232.png

  5. iCal Feed Header You will want to change the items to your time zone. (Copied it from another iCal feed not sure if all of it is needed, but it works so not changing it)
  6. Screenshot_2023-11-29_074216.png
  7. iCal Body and Footer
  8. Screenshot_2023-11-29_074432.png

Now using http://www.myserver.com/Webhooks/Lava.ashx/CalendarFeed?Location={{LocationId}} gives you an API call to an iCal feed for that location.

Create a Page for Links

I borrowed this from Leah Jennings's original Post to give credit.

Create a page (I did one under Room Management) to hold the links.

You need to add this to your header

<script src="https://cdn.rawgit.com/zenorocha/clipboard.js/v2.0.8/dist/clipboard.min.js"></script>

and then in an HTML block, I added the following.  When the buttons are clicked it copies the url to the api of that location.

Screenshot_2023-11-29_074922.png

Screenshot_2023-11-29_080206.png

Add the calendar to Outlook

  1. In Outlook Go to Calendars
  2. Add Calendar > From Internet
  3. Paste the URL from above and you have a feed.
  4. You can't add/change any events to this calendar, because the feed will overwrite anything added, so if your people want they will need another calendar to show those events, but they can overlay them in Outlook.