Notion is a great app for organizing your team’s data and documentation, but compared to a platform like Airtable, it has always been rather lacking when it comes to automation.Â
‍
And while they still haven’t closed that gap, Notion is making some impressive progress with their internal automations.Â
‍
In this post, we’re going to show you how to use the latest database automation features in Notion to help you save time and get more out of your Notion workspace.Â
‍
We’ll start with a very quick Slack automation that you can build with a free Notion plan. Then, we’ll show you some of the more advanced features that require a Notion Plus account.Â
What you’ll need to follow along with this tutorial
- Notion - free account (for the first automation)
- Notion Plus account (for the second automation)
- Slack - free account
- GMail - free account
Building a simple automation: Slack alerts for new pages in a Notion database
‍
To begin, we’re going to build an easy automation that just sends a Slack alert whenever a new page is added to a database in Notion.Â
‍
This is an automation that you can build with free plans in both Notion and Slack.Â
‍
Summary of steps:
Create a new automation
Choose a trigger: “Page Added”
Pick an action: “Send Slack notification to…”
Connect your Slack account to Notion
Select a Slack channel
Test the automation
‍
Creating a new automation
To get started with database automations in Notion, just open up the database you want to automate. Then, click on the lightning bolt up in the top right next to the search icon.Â
‍
‍
This will immediately create a blank automation canvas that you can configure with custom settings.Â
‍
‍
Under “When”, you’ll need to choose a trigger. In workflow automation, a “trigger” is an event that prompts an automation to run.Â
‍
For this workflow, pick “Page added”. That means this automation will run whenever a new page is added to this database.Â
‍
‍
If you’d like to restrict the automation so that it only runs for new pages that appear in a specific view, you can select that here where it says “for all pages in”.Â
‍
‍
However, for this example, we’ll have the automation watch the entire database for new pages.Â
‍
Adding an automated action: Send a Slack message
Under “Do”, you can pick an automated action to perform.
‍
On the free plan, you’ll see that only one option is available: “Send slack notification to…”
‍
‍
This will automatically send a precomposed Slack message to a channel of your choice whenever your trigger event occurs.Â
‍
There’s not much to configure in this action. The only setting you can customize is the channel that the message will be sent to.Â
Connecting Slack and Notion
When you click to select a channel, you’ll be prompted to connect a Slack account to Notion if you haven’t done so already. Click “Connect” to add a Slack account.Â
‍
‍
You’ll then see two pop-up windows appear in succession. The first pop-up will let Notion access Slack.Â
‍
‍
And the second one will let Slack access Notion.Â
‍
‍
Choose a channel for your notification
Now that Slack and Notion are both authorized, you can pick the channel you want to use.Â
For our example, we’ll choose a “tutorials” channel.Â
‍
‍
For this action, there’s nothing else to configure, so you can proceed to testing the automation.Â
Testing your automation: using forms to add pages to a Notion database
‍
Whenever you create an automation that runs for new pages in a Notion database, we’d strongly recommend using forms to add new pages rather than adding them directly to the database.Â
‍
If you create a new blank page and then fill in the info one field at a time, the automation might run before you can finish providing the necessary information. Consequently, the automation might not run correctly, as it could be missing critical information.Â
‍
You can click on the plus button to create a new view, and select “Form”.Â
‍
‍
This will automatically create a form for every editable field.Â
‍
‍
Under “Share”, copy the link for your form and open it in a tab.Â
‍
‍
Fill out the form to create a new page with all of its information already in place.Â
‍
‍
Notion automations run every few minutes, so the Slack message won’t appear right away. However, within a couple minutes, you should see the Slack alert with Notion’s preconfigured message, which includes links to the database and the new page.Â
‍
‍
This automation is all set. If you want to edit it or turn it off, you can find those options by clicking on the automation icon, and selecting the three-dot icon next to the automation’s name.
‍
Expanding your database automation with Notion Plus
Next, let’s take a look at what Notion Plus unlocks for database automation.Â
‍
We’ll build a similar but more advanced automation. It will still trigger when a new page is created in this database, but instead of sending a Slack message, we’ll have it compose an email in Gmail.Â
‍
‍
We’ll also include a custom variable that uses a formula to dynamically retrieve the URL of the new page.Â
‍
Create a new automation and choose a trigger
To begin, open up a database, and click on the lightning bolt automation. Create a new automation, and choose “Page added” as the trigger again.Â
‍
Add an action: Send mail
For the action, you’ll see that there are now several more accessible choices. you can edit properties in a database, create new pages, edit pages, send Notion notifications, or define custom variables.
‍
‍
For this first action, choose “Send mail to…”.Â
‍
Just like with Slack, you’ll need to connect a Gmail account before you can complete your setup.Â
‍
‍
‍
Now that Notion is authorized to use Gmail, you can compose the message you want to send.Â
‍
‍
For the recipient, you can either choose to send the email to a specific account attached to your Notion workspace, or dynamically pick an address from an email field in the table.Â
‍
In our example, we’ll just send all of these alerts to our XRayTutorials email.Â
‍
‍
For the subject line and message, you can enter static text directly, and insert dynamic data retrieved in the trigger.Â
‍
In our example, we’ll begin typing a simple subject line - “A new contact was added to the Directory database on…”
‍
‍
Then, we’ll insert some dynamic data for the date and time. You can type @ to pull up data retrieved in the trigger.Â
‍
‍
You’ll see all of the page’s attributes, as well as some metadata like the date and time the automation was triggered.Â
‍
For our example, use “time triggered” to display the date and time the new page was created.Â
‍
‍
In the message, we’ll provide some more detail about the page, like its title, and the email address of the new contact that the page represents. We’ll also include the URL of the page.Â
‍
Add an action: using a formula to update a property with conditional logic
The Gmail step is all set, but let’s add one more step here before we finish and test the automation.Â
‍
Let’s use Notion’s formulas with the “Edit property” step to update a field to a different value based on the value in another field. In our example, we’ll change the contents of the “Language” field based on whatever’s in the “Country” field.Â
‍
Add a new step at the end of the automation. Choose “Edit property”.Â
‍
‍
Choose the field you want to edit. For instance, we’ll be updating the “language” field.Â
‍
Then, click on the sigma symbol (ÎŁ) to write a formula.Â
‍
‍
We’ll start with an ifs statement, because we want to change the value of this variable based on different conditions.Â
‍
First, we need to specify a condition to evaluate. We’ll check if the “Country” field equals “UK”. You can see the syntax for that condition in the screenshot below.
‍
‍
Then, we'll provide the value to use for the “language” attribute if that condition is true – that is, if the country is UK. We’ll enter “English”.Â
‍
‍
You can add as many conditions as you’d like to an ifs statement. We’ll add one more for “France” and “French” using the same syntax.Â
‍
‍
Finally, we’ll wrap it up with a default choice - “No language provided”.Â
‍
‍
If none of the other conditions are true, then Notion will use this default choice, so we don’t need to provide a specific condition to test – just the value to use.Â
Learning more about formulas in Notion
Formulas can do a lot to expand the functionality of Notion automations, so we’d recommend checking out Notion’s docs to learn more about how they work.Â
Testing the finished automation
This formula’s all set, so we’ll click on “Save” to save the step.Â
‍
‍
Then, we’ll click “Create” to complete the automation.Â
‍
‍
Once your automation is finished, give it a few tests to make sure that conditional logic in the formula works as intended. Â
‍
For instance, we’ll submit three form responses: one from the UK, one from France, and one from India, which should trigger the default condition.Â
‍
‍
After waiting a moment, you should see some email alerts for each new contact.Â
‍
‍
And if you check the database, you should see that their languages are all configured correctly.Â
‍
Improved automation features for Notion power users
Ultimately, Notion’s automation tools are still not much to boast about in contrast to Airtable – and they certainly can’t compete with dedicated automation providers like Zapier, Make, or Pipedream.Â
‍
If you’d like to take your no-code automation game to the next level, we’ve prepared a beginner’s guides for all three:
‍
‍
However, for Notion power users or organizations who are already storing their data in Notion, these updated automation features will be a quick and convenient way to automate simple tasks in an app you’re already familiar with.Â
If you’d like to learn more about automating your work with the software you use every day, be sure to check out the other check out our blog or our YouTube channel. You can also follow XRay on Twitter, Facebook, or LinkedIn.