Database-automatiseringen

Database-automatiseringen
In dit artikel

Verhoog de efficiëntie door je meest vervelende taken te automatiseren 🔁

Ga naar Veelgestelde vragen

Database automations are sequences of actions that happen any time a specific change to a database occurs. Automations consist of both triggers (the events that initiate the automation) and actions (the effect of the automation). Database automations are meant to help save you time and simplify your work, and can be very basic or more complex depending on your needs.

Database-automatiseringen kunnen bijvoorbeeld worden gebruikt voor:

  • Toewijzen van taken aan bepaalde personen wanneer de status verandert.

  • Sending a Slack notification to a channel when a page is added to a database.

Opmerking:

  • Database-automatiseringen zijn volledig beschikbaar voor klanten met betaalde abonnementen. Gebruikers met een gratis abonnement kunnen automatiseringen maken voor Slack-meldingen. Ze kunnen automatiseringen die al opgenomen zijn in sjablonen wel gebruiken, maar niet bewerken.

  • Database-automatiseringen kunnen worden gemaakt, bewerkt en verwijderd door iedereen die volledige toegang heeft. Slack-automatiseringen zijn de enige uitzondering hierop. Deze kunnen alleen worden bewerkt door de ontwerper van de automatisering.

  • Als je automatisering gericht is op een andere database, heb je minimaal de machtiging Kan bewerken nodig voor die database. Met andere woorden: met de automatiseringen die je maakt, kan alleen content worden bewerkt die je ook handmatig kunt bewerken.

  • Database automations are available on paid plans on all platforms.

  • Database automations can be created, edited, or deleted by paid plan users who have full access to the database.

  • However, Slack automations can only be edited by the automation creator.

  • Free Plan users can create Slack notification automations, but no other kinds of automations.

  • Free Plan users can use existing automations in templates, but they won't be able to edit them.

To create a database automation:

  1. Click at the top of a database → New automation.

  2. Give your database automation a name if you’d like.

  3. Select New trigger to create a trigger. Then select Add trigger to create more triggers. Learn more about the types of triggers below →

  4. Select New action to create an action. Then select Add action to create more actions. Learn more about the types of actions below →

  5. Select Create.

Wist je dat je ook een eigenschap van het type Knop aan je database kunt toevoegen? Met één klik op de knop kun je acties laten uitvoeren in je database. Hier vind je meer informatie →

Automations can have one trigger or multiple triggers. When you set up an automation, you can decide whether the automation will take place When any of these occur or When all of these occur.

Note: If you have multiple is edited triggers that must all occur for your automation to take place, those triggers need to happen within a small window of about three seconds. If they don’t, your automation may not be triggered properly. To avoid this, you can:

  • Create separate automations for each trigger.

  • Use a more specific trigger than is edited, like is set to or contains.

You can choose from three types of triggers:

  • Page added means your automation will be triggered when a new page is added to your database.

  • Property edited means your automation will be triggered when a specific property from your database is edited. For name, person, number, text, select, and relation properties, you can choose what kinds of edits made to that property will trigger an automation. For example, you might have a list of contacts in a Notion database and set up an automation where the trigger is a phone number starting with the numbers 732, and the action is that person’s state being set to New Jersey.

  • Every {frequency} means your automation will be recurring. The trigger will happen repeatedly based on the frequency you set. You can set your automation to repeat every day, week, month, and so on. You can also set a time that the automation will be triggered, the date that the automation trigger will begin and end, and the timezone.

    Note: The Every {frequency} trigger works with all automation actions except for Edit property.

You can have more than one condition for your trigger so that two or more things must be true for the automation to occur. Note that a recurring trigger (like one that you set to repeat every week, month, etc.) can’t be paired with another type of trigger.

Note: If you’d like your automation to add or edit pages and databases, make sure that you have permission to edit those pages and databases. Additionally, make sure edited pages are available are not Private or Shared. Otherwise, your automation won’t work.

Automations can take one action or multiple actions. You can choose from a variety of actions:

  • Edit property will edit the properties of pages in the database you are currently in. For multi-select, people, and relation properties, you can add or remove individual values instead of adding or removing all values at once. For example, you might have a task database where if the task name contains the word “blog”, your name is added to the people property, even if there are other people already assigned to that task.

  • Pagina toevoegen aan voegt een pagina toe aan een bepaalde database en bewerkt de eigenschappen van die pagina.

  • Pagina's bewerken in bewerkt pagina's en eigenschappen in een database.

  • Melding versturen naar verstuurt een melding naar bepaalde mensen in je Notion-workspace. De melding kan worden verstuurd naar maximaal 20 personen in je workspace, of personen die zijn gekoppeld aan een bepaalde eigenschap Persoon in je database. Voeg eventueel een bericht toe aan de melding.

  • Send mail to will send an email from your Gmail account to one or more recipients. Learn more about this below.

  • Send webhook will send an HTTP POST requests to the specified URL. Learn more in this article →

  • Send Slack notification to will send a notification to the Slack channel you want. Learn more about Notion's Slack integration here →

  • Define variables will allow you to create a custom variable using mentions and formulas. You can then use this variable in other database automation actions. Learn more about this below.

Send mail to

Note:

  • You need a Gmail account to use this automation.

  • Once someone has linked their Gmail account to an automation, only they will be able to edit the automation. Others will only be able to use the automation.

  • Emails sent using this automation may take up to two minutes to arrive in your recipient’s inbox.

  • Be mindful of Gmail’s limits for how many recipients a message can have, or how many emails you can send in a day.

The Send mail to action for a database automation will send an email from your Gmail account to one or more email addresses when a trigger occurs. This is helpful if you want to send an email to someone to remind them to complete their past-due task, or to update your team on the status of all of your open projects.

To set up an automation to send an email:

  1. Click at the top of a database, then select New automation or an existing automation.

  2. Select New action or Add actionSend mail to….

  3. If your Notion account is already tied to a Gmail account, you’ll see your email address next to Send mail from. If you want to use another Gmail account for this automation, click on your email address → Add Gmail Account.

  4. You can set up various parts of your email:

    • To: This could be a person property (like Whoever triggered or Page creator), a person in your workspace, or a specific email address. This email address can be external — it doesn’t have to belong to someone in your workspace or your organization.

      • Select CC/BCC next to the To field to optionally CC or BCC other people.

    • Subject: Enter a subject for your email. Select @ in the Subject field if you want your subject to contain a property from your trigger page, a time or date, a person or group in your workspace, or a link to a page in your workspace. Select in the Subject field if you want to create a formula for your subject.

    • Message: Enter a message for your email. Select @ in the Message field if you want your message to contain a property from your trigger page, a time or date, a person or group in your workspace, or a link to a page in your workspace. Select in the Message field if you want to create a formula for your message.

    • Send with display name: This optional display name will appear next to your email when your recipient receives it. Select @ in the display name field if you want your display name to contain a property from your trigger page, a time or date, a person or group in your workspace, or a link to a page in your workspace. Select in the display name field if you want to create a formula for your display name.

    • Send replies to: If you want replies to your email to be sent to someone other than the email address you used to send it, you can use this optional setting to send the reply to a person property, or a person in your workspace.

Define variables

You can define a custom variable with mentions and formulas. You can then use this variable in other database automation actions. To define a variable:

  1. Click at the top of a database, then select New automation or an existing automation.

  2. Select New action or Add actionDefine variables.

  3. Click on Variable 1 to give the variable a name, edit the formula, or duplicate it. You can also select Add variable.

  4. Select @ or in the variable field to define your variables.

  5. You can use these variables in additional automation actions.

Let’s look at an example of when and how you’d create a custom variable. Let’s say you want to set an automation where when a parent task is marked as complete, all of its sub-tasks are automatically marked as complete.

  1. Click at the top of a database, then select New automation or an existing automation.

  2. Select the trigger as Status set to Complete.

  3. Select New action or Add actionDefine variables.

  4. Select in the field below Variable 1.

  5. In the window that opens, select Trigger page in the list of properties to the left.

  6. Put a period right after Trigger page in your formula, so that your formula reads Trigger page.. Once you do this, you’ll see the trigger page’s properties in the list of properties to the left.

  7. Select Sub-item. Your formula should now read Trigger page.Sub-item.

  8. Save your formula. Now, your custom variable is defined as the sub-items of the page that triggers your automation, or in other words, the page that is marked as complete.

  9. Now, in your database automation settings, select Add action.

  10. Select Edit pages in....

  11. Open the Select database dropdown and select Variable 1. This means that the automation will edit pages associated with variable 1, or in other words, sub-items associated with the page that is marked as complete.

  12. Open the Edit a property dropdown and select Status.

  13. Open the Select dropdown and select Complete.

  14. Selecteer Opslaan.

The next time you mark a parent item that has sub-items as complete, you should see all of the sub-items’ statuses change to complete too!

Note:

  • At this time, mentions and formulas can only be used in database automation actions, not triggers.

  • Formulas can’t be used when sending Slack notifications.

You can use mentions and formulas in your database automation actions to make your automations work better for you. For example:

  • You might want to mention the date in the name of a new page created in your database.

  • You might want to set up a database automation to send a notification to someone that mentions a specific page.

  • You might want to automatically send a message to someone when a ticket has been resolved, and use a formula in that message that calculates the time it took to complete the ticket.

To include a mention or formula in a database automation action:

  1. Click at the top of a database, then select New automation or an existing automation.

  2. Select New action or Add action. Find the action you want and select it.

  3. As you set up the automation action, select @ in the field if you want to mention a date, person, page, or a property from the trigger page in your database. Select in the field if you want to create a formula.

  4. Select Save when you’re done.

To make sure your automation is working properly, we’ll help you understand where your automation is invalid.

If your automation runs into any errors while you’re setting it up:

  • You’ll see information about where and what those errors are as you’re building or editing the automation.

  • You won’t be able to save the automation until you make the required corrections.

If your automation has worked before but runs into an error, the automation will be paused and you’ll get a notification. This situation might occur when:

  • A database that your automation is adding to or editing is missing.

  • A database property that your automation is editing is missing.

  • A third-party connection, like to Gmail or Slack, is no longer valid or needs to be authenticated.

You can click on the notification to go directly to the broken automation and fix it so it can be used again.

Once your automation is fixed, you’ll need to turn it on, or un-pause it, manually. To do this:

  1. Open the database that your automation is tied to and select •••Automations.

  2. Hover over the automation that you’ve just fixed and select •••.

  3. Toggle on Active.

To see and manage all of the existing automations for a database:

  1. Klik op boven aan een database.

  2. Plaats de muisaanwijzer op de automatisering en klik vervolgens op •••.

  3. Selecteer Bewerken, Pauzeren of Verwijderen.


Veelgestelde vragen

Hoe vaak wordt de database gecontroleerd op wijzigingen in eigenschappen?

Het activeren van database-automatiseringen neemt drie seconden in beslag. Binnen deze drie seconden kan een gebruiker een trigger verwijderen en wijzigingen wissen zonder dat een eigenschap van de automatisering wordt gewijzigd.

Werken automatiseringen op pagina's in de hele database of op pagina's in een databaseweergave?

Beide opties zijn mogelijk. Tijdens het maken van de automatisering kun je aangeven of deze van toepassing moet zijn op de hele database of op een bepaalde weergave. Als de filters in deze weergave worden aangepast, wordt de automatisering toegepast op de bijgewerkte lijst met pagina's.

Kunnen gasten met volledige toegang tot een database automatiseringen maken?

Nee.

Why isn’t my database automation triggering?

If your database automation isn’t triggering, it could be because:

  • The automation is set to be triggered by another automation. Automations can’t currently trigger other automations. Try using a different, non-automated trigger instead.

  • The page no longer matches a view’s filters after it’s edited. Automations only run if the page still matches the view when the trigger occurs.

  • The database is locked.

Heb je nog meer vragen? Stuur een bericht naar support

Geef feedback

Was deze bron nuttig?