Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 36 ยท Templates and Automations

Buttons and Recurring Templates

Use Notion button blocks and database buttons to run actions with one click, and set recurring templates that create pages daily, weekly or monthly.

Templates save typing, but you still have to remember to click. Notion has two features that remove even that: buttons, which run a list of actions when you press them, and recurring templates, which create pages on a schedule. Together they cover many small chores: a daily journal page, a weekly review, a "log a task" button on your dashboard.

Notion itself is not available here, so the real menus are described in words, and the examples are runnable JavaScript stand-ins that mimic the logic.

Button blocks

A button block is a block you place in any page. Type /button to add one. You then configure:

  • A label and optionally an icon and colour.
  • One or more actions that run in order when the button is clicked.

Common actions are:

Action What it does
Insert blocks Adds a set of blocks at the top or bottom of the page, or below the button
Add page to Creates a new page in a chosen database, with properties you set
Edit pages in Changes properties on pages in a database (often those matching a filter)
Show confirmation Asks "Are you sure?" before running
Open page Opens a chosen page after the other actions run
Send notification, mail or webhook Notifies people or other tools (availability depends on plan)

For example, a "Log a task" button can use Add page to the Tasks database with Status set to "Inbox" and the new page opened for typing.

Database buttons

A database button is a property instead of a block. Each row gets its own button that acts on that row. Typical uses:

  • A "Mark done" button that sets Status to "Done" and Completed on to today.
  • An "Archive" button that edits the row and shows a confirmation first.
  • A "Start" button that sets Status to "In progress" and the assignee to whoever clicked.

Inside a database button, actions refer to this page, which is why one definition works on every row. The "person who pressed the button" is also available as a value.

Stand-in: a button as a list of actions

This is plain JavaScript, not Notion. It models a button as an ordered list of small action functions applied to a row.

JS Stand-in: a Mark done button

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Recurring templates

A template can be set to repeat. In the template's settings (the New arrow, then the "..." next to a template, then Repeat), you choose a frequency:

  • Daily, weekly (pick weekdays), monthly or yearly.
  • A time of day, so the page is ready when you start work.
  • A property that receives the creation date, if you have one.

At the scheduled time Notion creates a page from that template in the database. You do not need to be online or have the page open. You can pause a recurring template or delete it later; pages that already exist stay.

Good recurring templates:

  • Daily: a journal or stand-up note.
  • Weekly: review, planning, a report skeleton.
  • Monthly: a bills checklist or invoice run.

Recurrence creates new pages. It does not reset or reopen an existing one. If you want a task that comes back after you finish it, use a recurring template (a fresh page each time) or a database property pattern, not an edit of the old row.

Stand-in: working out upcoming dates

The next snippet is a stand-in that lists the next few weekday occurrences of a weekly recurrence. It uses UTC so the output does not depend on your time zone.

JS Stand-in: next weekly pages

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Choosing between a button and a recurrence

  • Use a recurrence when the page should exist whether or not you remembered: daily notes, weekly reviews.
  • Use a button when the action depends on you deciding to do it: log an idea, start a project, close out a ticket.
  • Combine them: a weekly recurring template that contains a button block for the page's own checklist steps.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. What is the difference between a button block and a database button?

    A button block sits in a page body. A database button is a property, so each row gets its own button that acts on that row.
  2. 2. A recurring weekly template does what at the scheduled time?

    Recurrence creates a fresh page; existing pages are untouched.
  3. 3. Which action would you add so a destructive button asks before running?

    Show confirmation asks the user to confirm before later actions run.

Summary

  • Button blocks run an ordered list of actions: insert blocks, add or edit pages, confirm, open, notify.
  • Database buttons are properties that act on their own row.
  • Recurring templates create pages daily, weekly, monthly or yearly.
  • Use recurrence for things that must exist; use buttons for things you choose to start.

Next: Automations: Triggers and Actions