Skip to content

About

Turn Facebook events into an .ics calendar file (Google Calendar, Apple Calendar, Outlook). Data from the Facebook Events Scraper on Apify.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

facebook-events-to-ics

Turn Facebook events into an .ics calendar file you can import into Google Calendar, Apple Calendar, Outlook or any other calendar app. Every date of a recurring event (a weekly class, a residency, a tour) becomes its own calendar entry.

The event data comes from the Facebook Events Scraper on Apify, which returns public Facebook events by keyword, city, page or event URL without a Facebook login. Run it, download the dataset as JSON, and convert:

ruby fb_events_to_ics.rb events.json > events.ics

Or read the dataset straight from the Apify API (the dataset ID is on the run's Storage tab):

ruby fb_events_to_ics.rb "https://api.apify.com/v2/datasets/<DATASET_ID>/items" > events.ics

Then import events.ics: Google Calendar → Settings → Import & export; Apple Calendar → File → Import; Outlook → File → Open & Export → Import/Export.

What goes into each entry

Calendar field From the scraper
Title name
Start, end utcStartDate, utcEndDate (or each childEvents[].utcStartDate for recurring events)
Location venue location.name, address, location.city
GEO location.latitude, location.longitude
Description description, the organizer line, the ticket link, the Facebook URL
Status CANCELLED when isCanceled is true

Requirements

Ruby 3.0 or newer, nothing else. Works on macOS, Linux and Windows.

Keeping a calendar up to date

Schedule the scraper on Apify (daily is plenty), then run this script on the newest dataset and re-import, or point a workflow tool such as n8n at the same two steps. A ready-made n8n workflow that writes the events straight into Google Calendar without an .ics file is described on the scraper's page.

License

MIT

About

Turn Facebook events into an .ics calendar file (Google Calendar, Apple Calendar, Outlook). Data from the Facebook Events Scraper on Apify.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages