Notion Quick-Tips

Notion Quick-Tips - A growing collection of tips and tricks I use and find to help mastery of Notion.

Notion Quick-Tips

How to archive pages automatically after a period of time

This can be achieved using a status property, a last modified property, basic formula property and a filter.

Formula:


if(and(dateBetween(now(), prop("Last Modified"), "days") > 7, prop("Status") == "Completed"), true, false)
Please note: If you copy and paste the formula, it may have a hidden character at the end the gives and error. Just hit "del" after the last bracket to fix it
  • Create a Last Modified property. This is a date property that Notion uses to keep track of the last change made to a page.
  • Create a Status property. It doesn't have to use the "Status" type; the "Select" type will work just fine too.
  • Create a Formula property. Call it 'Archive' or something descriptive like that. Use the formula above.
  • Let's break down the formula:
    if(condition to check, true, false) - This starts the formula and returns either true or false. In this case, it returns true if the page hasn't been changed in over 7 days AND if the status is "Completed". Otherwise it returns false.
    and(true, true) - We need this check two separate conditions at once. Only if both conditions return true, does the functin return true.
    dateBetween(start date, end date, time unit) - Checks the date between the start date and end date and returns a number based on the time unit described. If this case, we use it to tell use how many "days"have passed between now() and the date showing on the Last Modified property. We want to know if more than (>) 7 days have passed since the page was last modified.
    now() - Simply returns the current date and time in a date format that the function dateBetween() can use.
    prop("Status") == "Completed" - The second argument in the and() function. It returns true if the Status property is set to "Completed". An alternative could be to use a Checkbox property and change the formula to: prop("Status") == true.