Hey everyone,
Shared this with a fellow bubbler and so thought I’d post here in case any advanced bubblers find it useful.
If anyone wants to create a dynamic ical subscription (from calendar events in your bubble app), here are the steps.
In short, it uses the ICS maker plugin + Rebrandly. Before I go into step by step, the big picture approach to have dynamic ical is this:
CREATING THE SUBSCRIPTION LINK:
Create .ics file using ICS maker plugin >>> use the .ics file url from ICS maker plugin and create a rebrandly link that references that .ics file url >>> have your users subscribe to the rebrandly url link in their apple/google/outlook calendars.
UPDATING THE SUBSCRIPTION ICS FILE:
Create an updated .ics file using ICS maker plugin >>> use that new .ics file url and UPDATE your rebrandly link created above to reference this UPDATED .ics file URL. When your user’s apple cal/google cal refreshes, that rebrandly link will now point to this updated .ics file URL.
BUBBL DATABASE STRUCTURE: In “User” data type, create three fields: “rebrandly_url”, “rebrandly_id”, and “ics_file_url”
STEP-BY-STEP:
-
Install ICS maker plugin and set up so you are ready to create an ical file. Here are instructions for ref: https://equina-playground.bubbleapps.io/ics_maker
-
Create a rebrandly account. You get first 500 links free https://www.rebrandly.com/. Rebrandly essentially is there to allow people to create alternative/shortened URL links to reference another URL. In this case, we are using this approach to create an rebrandly (static) URL for our .ics file url that the ICS maker plugin spits out. And we can then edit the .ics url this static rebrandly URL references (as we update our ical file), thus keep the same rebrandly link that your users have subscribed to in their calendars.
-
Using bubble API connector, set up rebrandly header like so
-
Create a ‘Create Link’ API:
NOTE: as you know, you need to initialize a test call in Bubble API connector to set it up. For the “fileURL” parameter, just use any link for now e.g. your website link. Once you are set up, this fileURL will be your ical file url that is in bubble.
-
Create an ‘Edit Link’ API:
-
Now that this is set up, when you use ICS maker plugin to create an ical file, you get access to the URL link to that file (here’s the image from ICS maker plugin demo page) and update your user’s “ics_file_url” field created above with this url.
In this work flow, also call the API with the ‘Create link’ as such
NOTE: the rebrandly link title and slashtag can be anything you want. In my case, I use the user’s name and unique id, respectively.
Then, use the created rebrandly URL and id that the API connector brings back and update your bubble DB fields created above:
-
Now your users can use the rebrandly URL and subscribe to it in their google cal or apple cal and it will populate with the ics file.
-
Next, you will have to create some mechanism of updating this link as your bubble calendar events change. You can schedule daily workflows or create a button for your users to refresh their calendar subscription in bubble (this workflow will include using ICS maker plugin to generate an updated ics file and then using the API connector ‘Edit Link’ api you set up above to update your rebrandly URL to reference this new updated ics file).
That’s it
Hopefully in the future bubble will let us update files in the root and keep the same file URL, that way you will only need the ICS maker plugin.
Let me know if you have any questions,
Muneer