How to automatically name your Notion database pages with automations
One property you currently can’t hide in Notion is the page name. It’s the central identifier for every database entry and the first property you’re prompted to fill. But keeping names meaningful and consistent across your database can quickly become a challenge.
When you’re in a hurry, it’s easy to skip naming altogether or default to something vague. Over time, this leads to a cluttered database with inconsistent or missing names. Collaborating with others just makes it worse, as each user applies their own naming conventions, making the database even harder to navigate.
Automated naming can help solve this issue. It ensures that all database entries follow a consistent format without requiring manual effort. Let’s look at a few scenarios where automating page names can save time and improve organization.
When does it make sense to automate naming?
Automating page names is particularly helpful when standardized formats improve the clarity and usability of your database. Here are some common use cases:
- CRM: Each lead could be named with the contact’s name and the company they work for, like “Michael Scott from Dunder Mifflin.”
- Journaling: Entries could be automatically named by their date, e.g., “December 20, 2024.”
- Emails: If you’re using Slap to manage emails in Notion, you might want pages named with the sender’s email address instead of the subject line.
Unlike other properties, the page name doesn’t support formulas natively. Thankfully, Notion Automations offers a solution. This guide walks you through automating page names in two scenarios: when properties are updated and when pages are created.
Update names when a property is edited
Let’s say you want every page in your CRM database to follow a strict naming convention: “Contact Name from Company Name”. For example, if you’re managing a deal with Michael Scott, the page would automatically be named “Michael Scott from Dunder Mifflin.”
Setting up the automation
- Navigate to the automation menu in your database and create a new automation. Name it Set name automatically.
- Scope: I’ll apply this automation to all the pages in the Leads database.
- Trigger: Select Any property is edited as the trigger.
- Action: Choose Edit property > Name and set it to Edit as formula.
Remember, we want to create a formula that will give us “Contact Name from Company Name”. Here is how to write it:
Trigger Page.Contact Name
: Retrieves the contact’s name. Note that Contact Name is a text property from my database.+
: This will allow me to concatenate the previous value with the next value." from "
: Adds the word "from" with spaces before and after for readability+
: This will allow me to concatenate the previous value with the next value.Trigger Page.Companies.first().Name
: Retrieves the name of the associated company. It’s written differently than the first bit of my formula because Companies is a relation field: it links this lead to a company stored in another database.
Here is the final result:
Save the automation, and you’re done! Anytime a property in the page is edited, the name will automatically update:
Limitations
Now, let’s talk about the limitation and ways to mitigate them. In this setup, if you manually edit a page name, the automation will overwrite your changes whenever another property is updated.
This means this setup works well if all pages in your database must follow the same naming convention exactly. If you want to keep some flexibility you can adjust the trigger to run only when specific properties (like contact name or company) are edited. This way, custom changes to page names are preserved unless the trigger conditions are met.
Using Slap? Update names when pages are created
If you’re using Slap to sync your emails with Notion, there is a slightly refined way to automate the naming of your pages. Instead of triggering the automation when a property is edited, you can trigger it upon page creation.
Imagine sending a promotional email to 100 contacts. By default, Slap uses the subject of the email as name for the page. Since all these emails share the same subject, you’ll end up with 100 identically named pages. In that case, you can use automation to rename each page with the sender’s email address for better clarity.
Setting up the automation
- Create a new automation in your database. Name it Set email page name.
- Trigger: Select When page is created.
- Action: Choose Edit property > Name and set it to Edit as formula.
For the formula:
Trigger Page.Email
: Retrieves the sender’s email address.
Save the automation, and every email page will now be named by its sender’s email address upon creation.
I like this setup better because, unlike the “property edited” trigger, this method won’t overwrite manual edits. You get clean, automatic names at creation but can adjust them later without losing your changes.
Limitations
This setup doesn’t work when creating pages manually because the “page created” trigger might execute before all properties are populated, leading to incomplete names. For example, a CRM entry could be named “Mic from” instead of “Michael Scott from Dunder Mifflin".
That’s why you have to use the “property edited” trigger when manually creating pages. But for pages created through Notion’s API (like it’s the case with Slap), the “page created” trigger works well.
Conclusion
Automating page names in Notion is a simple way to maintain consistency and organization in your databases.
- Use the property edited trigger for strict naming conventions.
- Use the page created trigger for flexibility with API-generated pages.
By choosing the right approach for your use case, you can save time and eliminate the frustration of messy, inconsistent database items names.
Have questions or tips on automating Notion? Reach out at laura@getslap.co.