How to Populate Custom Properties in a Database Using a Notion Step?

This topic was automatically generated from Slack. You can find the original thread here.

I am trying to create a page from database using a Notion step – but my custom properties are not showing up under property types. How can I ensure I can populate my custom properties in the database?

To populate custom properties in a Notion database when creating a page, you should follow these steps: 1. Ensure you’re using the Create Page from Database action in Pipedream. This action allows you to create a new page within a specific Notion database and populate the properties of that page. 2. When configuring the Create Page from Database action, after connecting your Notion account, you’ll select a Parent Database ID. This is the database where your page will be created. 3. For populating custom properties, you’ll need to pass a JSON object to the Page Content field that matches the structure expected by Notion’s API for your database’s properties. This JSON object should include keys that match the names (or IDs) of your custom properties and values that you want to set for those properties. Here’s a basic example of how you might structure this JSON object for a database with custom properties named Title and Status: ```
on { “Title”: { “title”: [ { “text”: { “content”: “My New Page” } } ] }, “Status”: { “select”: { “name”: “In Progress” } } }

do Notion properties have IDs, or can I use the property name?

In Notion, each property within a database or page does indeed have a unique identifier, known as a property ID. However, when interacting with the Notion API or using Pipedream’s Notion components, you have the flexibility to use either the property name directly or the property ID, depending on the context of your operation. For most actions, including retrieving or updating page properties through the Notion API or Pipedream components, you can reference properties by their name. This approach is often more intuitive and readable, especially when developing or maintaining integrations or workflows. However, there are scenarios where using the property ID might be necessary or more reliable, especially if you’re dealing with dynamic data or properties whose names might change. The property ID remains constant even if the property name changes, providing a stable reference. In summary, while Notion properties do have IDs, you can use the property name for most operations, offering convenience and readability in your integrations and scripts.