Notion formulas can automate many aspects of your workspace, but one lesser-known capability is selecting a page cover based on data in a database. You may want a project page to show a green cover when the status is Complete and a red cover when it is Overdue. This article explains how to use a formula property to output a cover URL that changes based on conditions. You will learn the exact formula syntax, how to set up the cover property, and common mistakes to avoid.
Key Takeaways: Conditional Page Cover with Notion Formulas
- Formula property with if() and empty(): Returns a cover URL string based on conditions like status or date.
- Cover field in database view: The formula output must start with a direct image URL to display as the page cover.
- Image URL format: Use a publicly hosted image link ending in .jpg, .png, or .gif — Notion does not support relative paths.
How Notion Formula Cover Selection Works
Notion does not have a native setting to change a page cover based on a database property. The workaround uses a formula property that outputs a direct URL to an image. When you set that formula property as the page cover in a database view, Notion displays the image from the URL. The formula evaluates conditions using functions like if(), empty(), and prop() to return different URLs depending on values in other properties.
The prerequisite is that you have a database with at least one text, select, or date property to base the condition on. You also need access to publicly hosted image URLs. Free services like Unsplash, Imgur, or your own web server work. The image URL must be a direct link to the file, not a webpage. For example, https://example.com/green-cover.jpg works, but https://example.com/gallery does not.
Required Database Properties
To follow this guide, your database must have:
- A condition property: A Select, Status, Date, or Text property that your formula will check.
- A formula property: This will hold the cover URL logic.
- A cover field: In the database view, you will set this to the formula property.
Steps to Create a Conditional Cover Formula
- Add a Formula property to your database
Open your Notion database. Click the plus button in the last column header. Select Formula from the property type list. Name it something like “Cover URL”. - Write the conditional formula
Click inside the formula editor. Use theif()function to check a condition. For example, if you have a Status property with options “Complete”, “In Progress”, and “Not Started”, the formula might look like:if(prop("Status") == "Complete", "https://example.com/green.jpg", if(prop("Status") == "In Progress", "https://example.com/yellow.jpg", "https://example.com/red.jpg"))
Replace the URLs with your own image links. The formula returns the first matching URL. - Test the formula output
Add a few test rows with different Status values. The Cover URL column should display the correct image URL as text. If you see an error like “Type mismatch”, check that the property names and values match exactly. Property names are case-sensitive. - Set the cover field in the database view
Click the database view name at the top. Open Layout options. Under Page Cover, select the Cover URL formula property. Notion will now display the image from the URL as the page cover for each row. - Verify the cover displays correctly
Open any page from the database. The cover at the top should match the image from the formula. If the cover shows a broken image icon, the URL is invalid or the image host blocks direct linking.
Common Mistakes and Limitations
Cover Shows a Broken Image Icon
The most common issue is an invalid image URL. Notion requires a direct link to an image file. Many sharing services like Google Drive or Dropbox provide sharing links that are not direct image URLs. To fix this, use a service that offers direct image links. Unsplash, Imgur, and GitHub raw URLs work reliably. Test the URL in a browser first. If it opens an image file, it will work in Notion.
Formula Returns an Error Instead of a URL
If the formula editor shows an error, check these points:
- All property names must match exactly, including spaces and capitalization.
- All strings must be enclosed in double quotes.
- Every opening parenthesis must have a closing parenthesis.
- The
if()function requires three arguments: condition, value if true, value if false.
Cover Changes Only After Manual Refresh
Notion updates the cover automatically when the condition property changes. If the cover does not update, refresh the page by pressing F5. If the issue persists, the formula may reference a property that does not trigger recalculation. Date formulas based on now() do not update in real time. They update when you edit the page or reload the database.
Notion Formula Functions for Cover Selection Compared
| Function | Use Case | Example |
|---|---|---|
| if() | Simple true/false or multiple conditions | if(prop("Status")=="Done","url1","url2") |
| ifs() | Multiple conditions without nesting | ifs(prop("Priority")=="High","url1",prop("Priority")=="Low","url2","url3") |
| empty() | Check if a property is blank | if(empty(prop("Due")),"url-default","url-due") |
| formatDate() | Compare dates for seasonal covers | if(formatDate(prop("Date"),"MM")=="12","url-winter","url-other") |
The ifs() function is easier to read when you have more than two conditions. It evaluates each condition in order and returns the first match. If no condition matches, you can add a default value as the last argument.
You can now create a Notion database where the page cover changes automatically based on any property. Start by adding a formula property and writing a simple if() condition. Test with two statuses first, then expand to more. For advanced use, combine formatDate() with ifs() to show seasonal covers based on a date property. This technique works in any Notion plan, including Free.