Skip to content

sjhand/Notion2ical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notion2ical

This is a simple PHP script streaming Notion database items/pages with a date into the iCalendar format.

Prerequisites

  • PHP ^8.1
  • Composer

Installation

Install dependencies through composer.

composer install

Create an .env file from the example, and set up the variables explained below.

cp .env.example .env

Set up a Notion integration to receive an API key.

The iCal feed will be accessible through https://www.yourdomain.com/index.php?k=<SECRET_KEY>.

Make sure you add the key in the 'k' GET variable.

Environment Variables

To run this script, you will need to add the following environment variables to your .env file

DEBUG_MODE Debugging mode (prints content if true)

SECRET_KEY Security key preventing public access

NOTION_API_KEY Notion API key

NOTION_DB_ID Notion database ID

NOTION_DATE_PROPERTY_NAME Notion property name containing the task date

NOTION_STATUS_PROPERTY_NAME Notion property name containing the status

NOTION_EXCLUDE_STATUS Notion status to exclude in the iCal feed

TTL Suggested update frequency for clients in ISO 8601 format

Changelog

Can be found here

About

This is a simple PHP script streaming Notion database items/pages with a date into the iCalendar format.

Topics

Resources

License

Stars

Watchers

Forks