Question

How do I make Zapier get Notion database properties?

  • 13 February 2024
  • 9 replies
  • 189 views

I want to automate a process that involves three steps.

  • The first step is to set up a schedule that runs every day at a certain time.
  • The second step is to connect to my Notion database and fetch all the information from it.
  • The third step is to send a message to a Discord channel using a bot. The message should look like this:
    • "Task name" is due on "Due date". "Assignee", please complete your task.

How do I do that? I am stuck on the second step. I select "Find Database Item" in the Notion step, but then it asks me to enter values for my properties, which is the exact opposite of what I need, which is retrieving the data from my Notion database that I can select the properties in the Discord action. Thanks!


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

Userlevel 7
Badge +14

Hi @zapmember29192 

Try using the Notion API: https://developers.notion.com/reference/intro

 

So does the Notion action not have the same functionality of the Notion trigger, which is pooling all of the data and making it selectable? When I set up a Notion trigger and test it, it pools all of the data from Notion and even shows me three records from my Notion together with data. How do I get that functionality in the Notion action, if at all possible? Do I have to use the API?

Userlevel 7
Badge +14

@zapmember29192 

Most Zap app triggers/actions work on a single record basis rather than a multi-record basis.

Examples:

  • New Data Base Item would trigger each time there is a new item.
  • Find Data Base Items would returned 1 item if found.

 

Alright, so I got all of the data from my Notion database using the Notion API call. Now comes the tricky part: since this is a daily reminder message that I need to send through Discord, I want to automatically pair the Task name, Assignee, and the Days Left (which is a property I’ve already created in my Notion database), and send a message for that specific record if the task hasn’t been completed yet. My Notion API call is basically a data dump that gets everything from my database. How would I do this, what logic would I need to follow? Please provide a direct answer.

Userlevel 7
Badge +14

@zapmember29192 

We would need to see a specific example with how you want the data formatted for Discord to have more context.

Or maybe I can have the Notion API just give me each record of my database separately that I can then splice using a tool within Zapier so that I can get each individual properties, and that way each property belongs to its appropriate record.

Regardless, this is how I want the message section of Discord to look like:

“Properties Task Name String: Get car”, your task is due on “Properties Task Name Date: 3/5/2024”. You have “Properties Days Left Number: 3”. “Properties Assignee String: Bob”, please complete your task ASAP.

The thing with the Notion trigger is that I have this sort of data readily available, but of course I can’t do the process that I actually want with that sort of trigger (since I want it to take the Days Left property every day, which is a Formula property that decrements daily), and to post that value for each record that has a status that is either “Not started” or “In progress” in my Notion database.

Userlevel 7
Badge +14

@zapmember29192 

API requests should return the raw JSON that you can then handle in a Code step however you want.

https://zapier.com/apps/code/help

Okay I finished my whole workflow and it should be good. I don’t want to wait an hour to have the trigger work. How do I test if the whole workflow works with all of the data that I need? I want to manually trigger the Zap. 

NOTICE: Clicking “Test” on the action does not suffice for this, as I need it to send me all of the data.

Userlevel 7
Badge +14

@zapmember29192 

Types of triggers: https://help.zapier.com/hc/en-us/articles/8496244568589-Types-of-triggers-in-Zaps

Zaps that use a Scheduled trigger have a “Run Zap” option in the Zap Drawer. (right arrow)