How to use notion automations to change task icons

Max Chew

In Notion, you can use the formula feature to automatically change task icons based on their status. This not only enhances the visual appeal of your workspace but also helps you manage tasks more clearly. For scenarios involving multiple conditions, I recommend using the ifs function as it’s more concise and easier to adjust compared to nested if functions. Of course, if you're interested in learning how to use nested if functions, click here for a practical guide.

✨ Want to create your own interactive tutorial? Snapdemo lets you build it without code. Free trial, no credit card needed.

Here’s a step-by-step guide:

1. Ensure the Column is a Formula

First, make sure the column you're working with is set to Formula. If you haven’t created one yet, click the + button at the bottom of your table and select Formula.

Notion table showing a column that is already set to Formula type.

2. Edit the Formula

Click on any blank space under the formula column, or click Edit formula to open the formula editor.

Cursor hovering over a formula column cell in Notion with the 'Edit formula' option visible.

3. Type the ifs Function

Type ifs in the editor and select it from the dropdown menu.

Formula editor open in Notion with ‘ifs’ being typed and highlighted in the function suggestion list.

4. Choose the Condition Column

Next, choose the column that you want to use as the condition, such as Status, Stock, or others. Pick the column that best suits your needs.

User selecting the ‘Status’ column from a list of available columns in the formula editor.

5. Write the Formula Logic

Now, write the formula according to your requirements. For example, if you want the status "Completed" to display a green circle 🟢 and "In Progress" to display an orange circle 🟠, your formula would look like this:

ifs(Status == "Completed", "🟢", Status == "In Progress", "🟠", true, "Unknown")

In this formula, ifs checks the status and returns the appropriate icon. A few things to keep in mind:

  • Each condition is followed by the icon you want to display (e.g., 🟢 or 🟠).
  • The last true condition ensures that if none of the previous conditions are met, it returns a default value. In this example, the default value is "Unknown," but you can customize this to whatever you prefer.

    Formula editor in Notion showing an ifs function with multiple conditions and emoji icons like 🟢 and 🟠

6. Save and Apply

Once you've finished writing the formula, click Save. Any future changes or additions to the status will automatically update the icons according to the new formula.

Completed formula saved in the Notion editor with task icons automatically showing in the table based on status.

The Difference Between if and ifs

Both if and ifs in Notion formulas allow you to return different results based on conditions, but there are key differences:

  • if Function:
    • Syntax: if(condition, result1, result2)
    • Use Case: Best used when you only need to check a single condition. It evaluates one condition and returns the first result if true, or the second result if false.
    • Example: If the status is "Completed," return a green circle; otherwise, return a red circle:

      if(Status == "Completed", "🟢", "🔴")

      If you want to see an example of how to use the if function in Notion, click here.

  • ifs Function:
    • Syntax: ifs(condition1, result1, condition2, result2, ..., true, default)
    • Use Case: Ideal when you have multiple conditions to check. It evaluates each condition sequentially and returns the corresponding result. If none match, the true condition acts as a fallback, returning a custom default value.
    • Example: Return different icons based on the status:

      ifs(Status == "Completed", "🟢", Status == "In Progress", "🟠", true, "❓")

When to Use if or ifs?

  • Use if: If you only need to check one condition, or you're concerned with a specific condition, if is the simplest and most direct choice.
  • Use ifs: If you need to check multiple conditions, ifs keeps your formula clean and avoids complex nested if statements.

✨ Want to create your own interactive tutorial?

Snapdemo lets you build it without code.

Try it for free, no credit card required.