# ICS → Discourse Importer

**URL:** https://meta.discourse.org/t/ics-discourse-importer/381646
**Category:** Extras
**Tags:** events, rest-api
**Created:** [September 4, 2025, 9:53pm UTC](https://meta.discourse.org/t/ics-discourse-importer/381646 "2025-09-04T21:53:54Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [September 4, 2025, 9:53pm UTC](https://meta.discourse.org/t/ics-discourse-importer/381646/1 "2025-09-04T21:53:54Z")

</div>

I’ve built a small utility that continuously syncs events from an iCalendar (ICS) feed into a Discourse category via the REST API.

This isn’t a full Discourse plugin — it runs alongside your Discourse install — so it belongs here in #Customization > Extras. If you want to display calendar events from an external source (e.g. Google Calendar, University timetable feeds, etc.) inside Discourse topics, this will be useful.

## Repository

> **[GitHub - Ethsim12/Discourse-ICS-importer-by-REST-API: Import and continuously sync events from an...](https://github.com/Ethsim12/Discourse-ICS-importer-by-REST-API)**
>
> Import and continuously sync events from an iCalendar (ICS) feed into a Discourse category via the Discourse REST API—idempotent, logs with systemd, and safe to run on a timer.

## How it works

- Reads events from a given ICS feed
- Matches them against existing topics (by UID or fallback to time/location)
- Creates or updates topics in your chosen category
- Can run continuously as a `systemd` service (safe against duplicate execution via flock)

* * *

## Requirements

- Ubuntu 24.04 LTS (tested)

- Python 3 (already in Ubuntu 24.04 LTS)

- A Discourse API key

- A category ID to target for event topics

## Example output

Here’s what it looks like when syncing a University timetable ICS feed into Discourse:

 ![IMG_1901](https://global.discourse-cdn.com/meta/original/4X/d/2/f/d2fa8b5a61bf0bd7e0bea3b3163d81d8631bfd9c.jpeg)

## Quick start

Clone the repo and install requirements:

```plaintext
git clone https://github.com/Ethsim12/Discourse-ICS-importer-by-REST-API.git /opt/ics-sync
cd /opt/ics-sync
pip install -r requirements.txt

```

Run a sync once manually:

```plaintext
python3 ics_to_discourse.py \
  --ics "https://example.com/feed.ics" \
  --category-id 4 \
  --site-tz "Europe/London" \
  --static-tags "events,ics"

```

Set up as a systemd service/timer for continuous sync (example configs in the repo).

---

_[View the full topic](https://meta.discourse.org/t/ics-discourse-importer/381646)._
