rmoff's random ramblings
about talks

Customising the fields shown in Airtable’s Calendar .ics export

Published Sep 12, 2022 by in Airtable at https://rmoff.net/2022/09/12/customising-the-fields-shown-in-airtables-calendar-.ics-export/

Airtable is a rather wonderful tool. It powers the program creation backend process for Kafka Summit and Current. It does, however, have a few frustrating limitations - often where it feels like a feature was built on a Friday afternoon and they didn’t get chance to finish it before knocking off to head to the pub.

The Problem

One of these limitations is that the .ics calendar sharing will only use the primary field of the table. Which means that a view that looks nice in Airtable:

Calendar view in Airtable with full details

will look like crap in your calendar application:

Fantastical showing record IDs

You’d think that the labels configured in the Calendar view:

Airtable calendar label config

would apply to the .ics but apparently not. Airtable support confirmed that the primary field is all that’s shown, and that this is a limitation.

The Solution (kinda)

This isn’t a perfect solution because it won’t automagically update as new records are added (UPDATE: see note below on how to do this!). However, if you have a static set of records, or are content to do additional manual work when you add any, then it may still be useful for you.

  1. Create a new table called Calendar (or whatever you want)

  2. Delete the columns that are created, and rename the primary field to something that represents the record that will be on the calendar. Since I’m using it to represent sessions at a conference I’m going to call it Session.

    New table
  3. Add a new field to the table, set it as a Link to another record and select the source table which holds the records you want on the calendar.

    When prompted, add the additional fields that you will want to use in the calendar:

    • Start date/time

    • End date/time (optional)

    • All the fields you want to use in the label

      Add the link field

      You should have a table that looks something like this:

      Empty table with all the necessary fields
  4. Now the cludgy bit (and if there’s a way to automate it, please do let me know!). Over in the source table, you’ll see a new column has been added for the link field to your new table (mine’s called Calendar and so is the link field)

    Link field added to the source table

    Click on the header of the primary field of your source table to select all the cells, and copy them to the clipboard (Cmd-C on the Mac).

    Copying the primary field values

    Now click on the header of the new link field and paste from the clipboard (Cmd-V on the Mac).

    Pasting the primary field values into the link field

    When you go to your new table you’ll see it populated with records matching those in the source.

    The new records in the link table
  5. Now to customise the primary field so that it displays the values that you want it to. Change the field type to Formula and set the formula to a concatenation of the fields required

    Setting the primary field formula
    Resulting primary field values
  6. Now the process is as normal - create a Calendar view and set the start/end dates from the lookup fields included in your table:

    Setting the calendar start/end date fields

    The calendar will show using the primary field value by default (you don’t need to customise the labels now):

    Calendar view showing records

    And with the .ics share link created… image::/images/2022/09/airtable15.png[.ics share link]

    …it renders exactly as we want it in our external calendar app:

    External calendar view
If you add new records to the source table you need to make sure that the link field has the primary field value set in it, otherwise the Calendar table that we’ve created won’t get an entry for it.

Update: AirTable’s Support is Awesome 🎉

How cool is this? I shared my blog with AirTable support and they made a video showing how to close the loop on this and automate adding records to the Calendar table from the main one! Check it out:

Bonus Points: Fixing the Time Zones in Airtable Calendar

Another hack here, but I honestly can’t make head nor tail of the logic used in the date/time fields and time zones. In the absence of a way to set the time zone, I’ve resorted to creating a derived field in the Calendar table above and a formula to shift the time as necessary:

DATEADD({Start (from session_link)},5,'hours')
Changing the time zone in an Airtable field

You can then reconfigure the Calendar view to use the new field with the fixed time zone:

Using the new fixed TZ field in Airtable calendar view

Robin Moffatt

Robin Moffatt is a Principal DevEx Engineer at LakeFS. He likes writing about himself in the third person, eating good breakfasts, and drinking good beer.

Story logo

© 2023