How to use the Pie Calendar Connector add-on
BETA DOCUMENTATION
This documentation is under development while the Pie Calendar Connector add-on is in beta. We will be updating as we continue to develop the add-on toward its official release. If you notice any inaccuracies or missing information, please contact us for assistance at: support@piecalendar.com.
The Pie Calendar Connector is an add-on for Pie Calendar (free and Pro) that enables you to use additional event sources. The currently supported sources are:
- Eventbrite
- ICS feeds
To enable these additional sources,
Setting up Eventbrite
Pie Calendar Connector's integration with Eventbrite is full-featured, pulling Eventbrite events into your database via the API provided by Eventbrite. It also synchronizes changes via Eventbrite's webhooks, so after the initial setup, your events will stay synchronized automatically.
1 - Getting your Eventbrite API key
- First, log in to Eventbrite and navigate to Account Settings via the menu at the top right of the page.
- On the left-hand side of the Account Settings page, expand the "Developer Links" area and click "API Keys."
- Click "Create API Key" and enter all of the requested details.
- Once completed, you will be given an API key, a client secret, a private token, and a public token. Copy the private token, this is the only one we need.
2 - Adding your API key and organization to Pie Calendar Connector
- Navigate to your WordPress admin panel.
- Go to Settings > Pie Calendar Connector.
- Enter your private token in the provided field and click "save changes."
- Once the page refreshes, use the "Eventbrite Organization ID" dropdown to choose your organization. For most Eventbrite accounts, there will be only one option.
- Click "save changes" again.
Synchronizing your Eventbrite events with Pie Calendar Connector
- With your private token saved and organization selected, you should now see some information regarding your Eventbrite event synchronization status.
- Click the "Synchronize Eventbrite Events" button to pull in all existing events from your Eventbrite organization.
- You should see the synchronization status update with the number of events that were synchronized.
Note: If something goes wrong, there is an option to delete all Eventbrite events from your local database. They can be re-synchronized later, and this does not delete anything from your Eventbrite account.
Setting up your Eventbrite webhook
To ensure events on your WordPress site are updated when something changes in Eventbrite, you need to set up a webhook. This is optional, but encouraged to avoid having to manually re-synchronize events periodically.
- On Eventbrite, go to Account Settings -> Developer Links -> Webhooks.
- Click "Add Webhook."
- In the "Payload URL" field, put: https://{yoursite.com}/wp-json/piecal-connector/v1/webhook/update
- Important: Replace {yoursite.com} with the URL to your site, otherwise it will not work.
- For Actions, you can activate all actions, but this may result in a large number of calls to the endpoint on your site. The only actions accepted or required by the Pie Calendar Connector webhook endpoint are:
- event.created
- event.published
- event.unpublished
- event.updated
- Save the Webhook, then click "Test" and check the "Recent Requests" area for a request with a 200 status code. If you see a 400 or 403 status code, expand the request and look at the response body to identify why the call was rejected.
Now, any time an event is created, updated, published, or unpublished, its status will change on your WordPress site as well.
Note: Webhook updates are not instantaneous. It can take up to several minutes for Eventbrite to send the webhook call after an action is performed. To check if a call has been made, you can look at the request log for the webhook in Eventbrite's Webhooks area.
Enabling the Eventbrite source in your calendar
Now that everything is set up, you just need to enable the Eventbrite source for your calendar.
If using the Block, select the calendar Block and expand the "Event Sources" control panel. There, tick the "Eventbrite" box and you'll see your synchronized Eventbrite events in the calendar.
If using the shortcode, add the attribute sources="eventbrite" to show synchronized Eventbrite events. If you want to also show other sources, include them in the sources attribute value, e.g. sources="native, eventbrite" .
Setting up ICS Feeds
ICS feeds are not an API integration, so the steps are much simpler.
If using the Block, select the calendar Block and expand the "Event Sources" control panel. There, tick the "ICS" box and then drop in your accessible ICS feed URL into the textarea below.
If using the shortcode, add the attribute sources="ics" to enable ICS feeds, then add the attribute icsurls="{url to your ics feeds},{comma separated for multiple}" where the curly-bracketed placeholders are replaced with the actual ICS feeds you want to display.
Note: Not all ICS feeds are public. If using something like Google Calendar, for instance, there's a private ICS feed URL you'll need to use if you don't want to publish your calendar for the world to see.