Welcome to the rabbit hole, fellow dev.
If you’ve ever thought: “Man, I wish I had a bot to do this boring thing for me,” this post is for you.
We’re going to build an automation bot using n8n, JavaScript, and Notion. It’ll be simple, practical, and immediately useful. You’ll walk away with a working automation that logs a new Notion entry every morning — a personal daily log system — and you’ll understand how to use n8n like a developer, not just a no-code enthusiast.
Why This Matters
You’re a developer. That means you should be automating repetitive stuff. Period.
Whether you’re tracking habits, logging ideas, or just want to mess around with APIs, combining n8n, JavaScript, and Notion gives you a low-code playground with full control.
Here’s what we’re building:
- A bot that triggers every morning at 9AM
- It creates a new Notion page with the current date
- Optionally includes a motivational quote (because why not?)
What You’ll Need
- A free n8n Cloud account or local setup
- A Notion integration
- Basic Node.js knowledge
- A Notion database prepared for logging (we’ll set this up below)
Step 1: Set Up Your Notion Database
In Notion:
- Create a new database (Table view works best)
- Add these columns:
- Title (this is the main field — type: title)
- Date (type: Date)
- Quote (type: Text)
- Share the database with your integration:
- Go to the top-right “Share” button
- Invite your integration (you’ll need its token)
In your Notion integration dashboard:
- Create a new integration
- Copy the internal integration token
- Share the database with that integration
Step 2: Build the Flow in n8n
Create a new workflow in n8n.
1. Add a Trigger Node: Schedule
{
"mode": "everyDay",
"hour": 9,
"minute": 0
}
2. Add a Function Node: Generate Data
const today = new Date();
const quotes = [
"Keep it simple, stupid.",
"Make it work, make it right, make it fast.",
"Code never lies, comments sometimes do."
];
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
return [
{
json: {
title: today.toDateString(),
date: today.toISOString(),
quote: randomQuote
}
}
];
3. Add a Notion Node: Create Page
{
"Title": {
"title": [
{
"text": {
"content": {{$json["title"]}}
}
}
]
},
"Date": {
"date": {
"start": {{$json["date"]}}
}
},
"Quote": {
"rich_text": [
{
"text": {
"content": {{$json["quote"]}}
}
}
]
}
}
Optional Bonus: Use a Real Quote API
GET https://zenquotes.io/api/random
return [
{
json: {
title: new Date().toDateString(),
date: new Date().toISOString(),
quote: items[0].json.q + " — " + items[0].json.a
}
}
];
Takeaways You Can Use Today
- n8n plus JavaScript gives you the best of both worlds: visual logic with full code control
- You can automate Notion without writing a full custom app
- This same workflow pattern can be reused for:
- Logging emails
- Tracking your coding hours
- Creating journal entries
- Syncing data from GitHub, Trello, or Slack
What Next?
If this sparked ideas — good. That’s the point.
Want to go deeper into building your own developer automation stack? Or learn how to connect n8n to GitHub, Discord, Notion, and other tools?
Check out more automation tutorials on RegularCoder.com or subscribe to the newsletter to get practical dev workflows delivered every week. No spam, just useful stuff.