Apple + Google Calendar Sync Guide

Calendar Sync & API Reference

Connect Apple Calendar with iOS Shortcuts or Google Calendar with Apps Script. Each member can sync their own events into the same Shalendar calendar.

iOS Shortcut Setup

Step-by-step Apple Calendar sync workflow

Before you sync
  • Each member can run a copy of the Shortcut on their own iPhone.
  • Set partner_name to your exact member name, or set it to "BOTH" to sync joint events to all members on standard calendars. Privacy-capable calendars sync one member at a time.
  • Set source to "apple" or "google". Each source has its own sync window and won’t remove the other source’s events.
  • For privacy-capable calendars, use your own member name and access password. Other members only receive Busy for your event titles.
  • Format dates as ISO 8601 with a timezone offset or Z.
  • A stable unique event ID is needed to update the same event on later runs. A title or Name value may repeat.
  • Without sync_start and sync_end, a run with no events will not remove previously synced events.
  • With a sync window, missing events from the selected source are removed inside that window. Manually created events and events from the other provider are kept.
Step 1Set up your calendar and Shortcut

Create a calendar in Shalendar first. On your iPhone, create a Shortcut named Sync Shalendar. Add three Text actions for the calendar name, shared password, and your exact member name; save each with Set Variable. If editing a shared Shortcut, replace any example credentials in both Text actions and request body fields. Keep the password private when sharing or exporting a Shortcut.

Step 2Find Calendar Events

Add Find Calendar Events and filter Start Date to the next 7 days. Add a Calendar filter if you only want to sync one Apple Calendar.

Step 3Loop Events & Extract Details

Add Repeat with Each for the found events. Inside the loop, get each event's Title, Start Date, and End Date. Format both dates as ISO 8601 with time. Also get a stable unique event identifier for external_shortcut_id. Using the event's Name or title as the ID can merge distinct events with the same name.

Step 4Format Items into JSON Dictionaries

Inside the loop, add a Dictionary with these keys:

• title → Title
• start_time → Start Date (Formatted as ISO 8601)
• end_time → End Date (Formatted as ISO 8601)
• external_shortcut_id → stable unique event ID

Add each dictionary to an EventList variable. Pass that list as the events array, including when it contains just one event.

Step 5Send POST Request to /api/sync

After the loop, add Get Contents of URL:

• URL: https://shalendar.aaryandehade.com/api/sync
• Method: POST
• Header: Content-Type: application/json
• Request Body: JSON containing calendar_name, password, partner_name, timezone, and events (the EventList variable). You can use the JSON body editor, or send a Text action containing valid JSON as a File body with the same header. Run it once and check for success: true before adding automation.

Step 6Automate Background Sync

In the Automation tab, add a Time of Day personal automation, set it to run daily, and select Sync Shalendar. Choose Run Immediately if available on your iOS version, or turn off Ask Before Running.

Get Contents of URL configuration

URL

https://shalendar.aaryandehade.com/api/sync

Method

POST

Header: Content-Type

application/json

Body Type

JSON, or File with JSON Text

Common Questions

Frequently asked questions

Q1.Can one Shalendar member sync Apple and Google calendars?

Yes. Run separate Apple Shortcuts and Google Apps Script syncs with the same partner_name, using source set to "apple" or "google". Each source cleans up only its own events.

Q2.How does a privacy-capable calendar work?

Privacy is chosen when the calendar is created and cannot be changed later. Each member signs in with their own name and password. Other members receive only Busy in place of event titles.

Q3.Can privacy calendars sync events for BOTH members?

No. A privacy calendar sync must authenticate one member at a time so event titles stay private.

Q4.Why are my event times shifted?

Use ISO 8601 timestamps with an explicit offset, such as 2026-09-14T08:00:00-07:00, or UTC with Z. Check the selected calendar timezone view as well.

Q5.What is external_shortcut_id used for?

It identifies the same event across runs. Use a stable unique value; an event title or Name alone may collide with another event.

Q6.Why did an empty sync leave old events?

With no events, the API needs both sync_start and sync_end to know which stored events to remove.

Shalendar — Shared Calendar Web App
Hosted at shalendar.aaryandehade.com