How to Set Notion Database Page Icon From Property Value Automatically
🔍 WiseChecker

How to Set Notion Database Page Icon From Property Value Automatically

Notion databases display each page with a default gray icon. You may want each page to show an icon that matches a property value such as a project category, status, or priority. Notion does not offer a built-in setting to map a property value to an icon. This article explains how to use a formula property combined with the Notion API to automatically assign a page icon based on a text or select property value.

You will learn the formula syntax that generates a public emoji URL and how to trigger the icon update using a no-code automation tool. The method works for any Notion database on a workspace with API access. After following these steps, every new or updated page will display a relevant icon without manual work.

Key Takeaways: Automate Database Page Icons From Property Values

  • Formula property with “if” statements: Generates a URL string that points to a specific emoji image based on a property value.
  • Notion API endpoint “Update page”: Accepts the generated URL and sets the page icon programmatically.
  • External automation tool like Zapier or Make: Triggers the API call whenever a page is created or modified in the database.

ADVERTISEMENT

How Notion Page Icons Work and Why Automation Is Needed

Every Notion page can have a custom icon displayed next to the title. You can choose an emoji, upload a custom image, or leave the default icon. When you add a new page to a database, you must manually set the icon unless you use a template. Templates allow a fixed icon for all pages created from that template, but they cannot change the icon based on a property value. For example, a task database with statuses “To Do,” “In Progress,” and “Done” cannot automatically show a different icon per status using templates alone.

To achieve dynamic icons, you need to combine a Notion formula with the Notion API. The formula creates a URL that points to an emoji image hosted on a public CDN. The API reads that URL and sets it as the page icon. An automation tool watches for new or updated pages and runs the API call. This approach requires a Notion workspace with API integration enabled and a tool that can make HTTP requests.

Formula Property That Generates an Emoji URL

The formula uses the if() function to check a property value and return a matching URL. The URL format for an emoji from the Twemoji CDN is https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f600.svg where the last part is the Unicode code point for the emoji. You replace the code point for each condition.

Notion API Icon Endpoint

The Notion API endpoint PATCH /v1/pages/{page_id} accepts a JSON body with an icon object. For an external image icon, the object has "type": "external" and "external": {"url": "your-url"}. The automation tool sends this request with the URL from the formula property.

Steps to Set Up Automatic Page Icons From Property Values

Follow these steps to create the formula, connect the API, and automate the icon update. You need a Notion workspace with API access and a free account on Zapier or Make.

  1. Create a formula property that outputs an emoji URL
    Open your database. Click the + button in the last column header. Select Formula. Name it “Icon URL.” Paste the following formula template, replacing the property name and emoji codes with your values:
    if(prop("Status") == "To Do", "https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4cb.svg", if(prop("Status") == "In Progress", "https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f501.svg", if(prop("Status") == "Done", "https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2705.svg", "")))
    Find the Unicode code point for each emoji you want. Use a site like Emojipedia to copy the code point. The URL must use the SVG format with the code point in lowercase hex without the U+ prefix.
  2. Create a Notion integration in the workspace
    Go to https://www.notion.so/my-integrations. Click New integration. Give it a name such as “Auto Icon Updater.” Select the workspace that contains your database. Click Submit. Copy the Internal Integration Secret token. You will use this token in the automation tool.
  3. Share the database with the integration
    Open your database in Notion. Click the menu in the top right. Select Add connections. Find your integration name and click it. The integration now has read and write access to that database.
  4. Set up an automation in Zapier or Make
    Create a new automation. The trigger is New Database Item or Updated Database Item in Notion. Select the database you shared. For the action, choose Notion > Update Page or use a custom HTTP request. Map the Page ID from the trigger to the action. In the action, set the Icon URL field to the value from the formula property. If you use a custom request, the JSON body looks like this:
    { "icon": { "type": "external", "external": { "url": "{{formula_property_value}}" } } }
    Test the automation by adding a new page with a property value that matches one of your conditions. The page icon should change to the corresponding emoji within a few seconds.
  5. Handle existing pages that need an icon update
    The automation only runs when a page is created or updated. To update existing pages, run a one-time bulk action. Use a tool like Notion API with a script or a batch update in Make. Fetch all pages in the database, then loop through each one and call the Update Page endpoint with the icon URL from the formula property.

ADVERTISEMENT

Common Problems and Workarounds When Setting Page Icons Automatically

Formula Returns an Empty String and No Icon Appears

The formula returns an empty string if the property value does not match any condition. Add a default condition at the end of the nested if() statements. For example, use a generic emoji URL as the final fallback value. Also verify that the property name in the formula exactly matches the database property name, including capitalization and spaces.

API Request Fails With a 400 Bad Request Error

The API expects the icon URL to be a valid, publicly accessible image URL. The Twemoji CDN URL must point to an SVG file. If you use a PNG URL, the API still accepts it, but the icon may not render correctly in some Notion views. Ensure the URL ends with .svg or .png. Also check that the integration token has not expired and that the database is still connected to the integration.

Automation Triggers on Every Edit, Causing Unnecessary API Calls

If your automation triggers on every database item update, it will call the API even when the relevant property did not change. To reduce API calls, add a filter in your automation tool. For example, in Zapier, add a filter step that only continues if the Status property value changed. In Make, use a router with a filter condition. This prevents unnecessary requests and stays within API rate limits.

Manual Icon Assignment vs Formula + API Automation: Comparison

Item Manual Icon Assignment Formula + API Automation
Setup effort None; requires clicking each page Requires formula creation and automation setup
Icon changes dynamically No; icon stays until manually changed Yes; icon updates when property value changes
Works without API Yes No; requires Notion API integration
Supports custom images Yes; upload any image Only external URLs; cannot upload local files
Bulk update existing pages Not practical for many pages Possible with a batch script

Manual assignment is simpler for small databases with few pages. Automation is better for large databases where the property values change frequently and you want consistent visual cues without manual work.

You now have a working method to automatically set a Notion database page icon based on a property value. The formula generates the correct emoji URL, and the automation tool calls the Notion API to apply it. To extend this further, you can add more conditions to the formula for additional property values. For advanced users, use the Notion API directly with a scheduled script to update icons on a timer instead of relying on triggers.

ADVERTISEMENT