A bot that adds recurring tasks to Notion using the official API
Instructions can also be found here
How to Update to Latest Version \ Bugs \ Set Up Notion \ Set Up Integration
How it Works / How to Use \ Limitations \ Upcoming Improvements / Features / Ideas
At this time, there is no way to automatically update a forked repl
index.js
from this repo and replace the index.js
in your replundefined
. body.properties.Due Date.date.name should be defined, instead was undefined
. body.properties.Due Date.date.start should be a valid ISO 8601 date string, instead was "Invalid DateTime"
."Create a table database for the integration to work with
Go to your Notion Integrations
Click on + New integration
Name the integration, point it to the correct workspace, and click Submit
You can access the Internal Integration Token by clicking Show and then Copy (you need this for a later step)
Go back to the database and click on Share in the upper right-hand corner
Invite the integration you just made by clicking on Invite and then the name that you wrote in Step 4
These steps are loosely based on An Idiot's Guide to hosting discord bots
Create a replit account
Open the recurtion repl
Fork the repl
The forked repl should open. Go to the Secrets tab on the left hand side
Click on Open raw editor\
Copy the code snippet below and paste into the editor
{
"NOTION_TOKEN": "your-notion-token-here",
"CHECKBOX": "Done",
"DUE_DATE": "Due Date",
"RECUR_INTERVAL": "Recur Interval (select)",
"INVALID": "Invalid format",
"ADDRESS": "https://your-own-address-here.repl.co"
}
Replace each value with your own values and save
https://{name-of-repl}.{your-username}.repl.co
https://recurtion.leannestodoming.repl.co
Click on the Run button at the top of the screen \
(Optional) If you want an even more reliable way to keep the program running 24/7, follow these instructions
Enjoy recurring tasks in Notion!
To preform this option, you should be comfortable with using the command line interface. You should also have npm installed on the server you are using. If you don't have npm installed or you aren't sure, follow these instructions.
Clone this repository onto the server
git clone https://github.com/LeanneStoDomingo/recurtion.git
Go into the new folder
cd recurtion
Create the environment variables file (these instructions use nano but you can choose any cli text editor that you would like)
nano .env
Type the code snippet from below into the file
NOTION_TOKEN=your-notion-token-here
CHECKBOX="Done"
DUE_DATE="Due Date"
RECUR_INTERVAL="Recur Interval (select)"
INVALID="Invalid format"
PORT=3000
ADDRESS=http://localhost:3000
Replace each value with your own values
Save and exit the text editor by pressing ctrl+x
y
enter
(Optional but recommended. Skip to Step 10 if you don't want to do these optional steps) \ Open index.js
nano index.js
Delete everything after the // web server
comment
// web server
const PORT = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.writeHead(200);
res.end('ok');
});
server.listen(PORT);
setInterval(() => {
http.get(process.env.ADDRESS);
console.log('pinging server...');
}, 1000 * 60 * 4); // pings every 4 minutes
^ all of this should be deleted
Save and exit the text editor
Initialize node
npm install
Start the program
node index.js
or
npm start
Enjoy recurring tasks in Notion!
every other day
Invalid format
every 2 days
every single day
Invalid format: every single day
every day
Invalid format
every day for 7 days
7 days
part of the interval which means it won't stop after 7 days, it'll just continueevery day exclude Mondays
exclude Mondays
part