[Notion] - Unable to get correct results of values in Formulas property

Describe the problem/error/question

I am using Notion to manage some finances and lead generation in our team. We are only familiar with basic n8n workflows and Notion usage. So, we decided to go with a Notion template and create a basic automation that reports the daily usage and other stuff in our Slack chat through n8n.

But, the values that we get from Notion are not correct, for many formula fields. I am presenting a single example here, as it is the most crucial.

The property is named “Current Balance”. The formula for that is:

(((prop("Starting Balance") + prop("Total Incomes")) - prop("Total Expenses")) + prop("Total Transfer-In")) - prop("Total Transfer-Out")

The values are being displayed properly in Notion. But, in n8n, if I try to fetch the page from the database, it shows only the “Starting Balance” property’s value. Attaching a screenshot for reference:


I have also set up the n8n connection as mentioned in the docs. (Also, the entire set of databases has this connection added)

image

What is the error message (if any)?

No error message, only incorrect value.

Please share your workflow

Share the output returned by the last node

Attached as screenshot

Information on your n8n setup

  • n8n version: 1.5.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting: main
  • Running n8n via: Docker
  • Operating system: Ubuntu 22.04 minimal aarch64 LTS

Hi @Jayavel, I am sorry you’re having trouble. I tried reproducing this with a simplified data structure using this formula in Notion:

image

n8n is, however, showing the right result for me:
image

Can you confirm where the fields in your Notion database not shown on your screenshot live (Total Incomes, Total Expenses, Total Transfer-In, Total Transfer-Out), how you’ve configured each of them and which value each of these has?

And does the behaviour change for you when disabling the “Simplify” option on your Notion node?

1 Like

Thanks for getting back.

Actually, we purchased this Notion template online, so we do not know the intricacies of this. This has different sets of databases for each Income, Expenses and Transfers. In those databases, there are multiple properties and they are referenced under each account in the ‘Accounts’ database. That is the formula I presented earlier.

The output does change quite a bit when we disable the ‘Simplify’ option. But, the problem remains.

One peculiar thing though. We tried to setup everything afresh in Notion. It worked properly, so we started adding the remaining pages to the database, and after adding 3, it stopped working properly. Now, the same issue occurs.

Not sure what we are doing wrong. Can you explain what are the exact details you need, so that we can find and get them?

So this would depend on the number of pages in a database for you? Meaning it’s working for the first 3 pages, but fails afterwards?

Not sure what we are doing wrong. Can you explain what are the exact details you need, so that we can find and get them?

Perhaps you can share the template (or an example Notion page) you are using with me so I can try and reproduce this myself? Feel free to send me a DM if you don’t want to share it publicly. Just be aware that I’ll be out shortly and might only be able to look into this next week.

Yes, we did try it again, and it happened the second time itself. (After adding the second database page, the values got messed up) If we have only one, it is functioning without any issues.

Sure, I’ll send you the link in DM.

Okay, pls get to this once you are available.

Having exactly the same issue and flagged it almost a year ago. Think it might actually be worse now with Notion Formulas 2.0 as previously some of my fields came through correctly but now almost none of them work. Also before I was able to repeat/mirror problematic fields in additional formula or rollup properties but I can’t seem to get that working either. Very frustrating not being able to access this data.

Any insight into the nature of the problem would be massively appreciated @MutedJam, as always.

Cheers

1 Like

Yes, we are facing a lot of issues with other values too. I can now see that they are becauase of the new formula update released by Notion.

Hi @Jayavel, thanks for sharing your Notion template!

It doesn’t seem to include any data currently, can you tell me exactly what I need to add to your example and which database page I need to fetch in order to see the problem?

Thank you!

Hey, sorry for the delayed response.

In that template, you have to start by adding an “Account” and filling in the ‘Starting Balance’ and record some expenses.

The ‘Accounts’ is a database and any entry you add to that will become a Database Page. So, if you add Amex as an Account and fill in $2000 as the opening balance, you can then record some expenses which will automatically update the “Current Balance” property.

After this, if you pull this account’s data in n8n, it should show the Opening and Current balance.

Now, you can add more accounts and check for each entry, if you get the correct ‘Current Balance’ value.

1 Like

Thanks @Jayavel, I have now tried this with your template and have added the following expenses:

This is how the account looks like in Notion:

This is how it looks in n8n for me using the Notion node from your example workflow (I only updated the ID to match my account page):

So the data does match from the looks of it. This also works fine when adding more data, for example:

Notion:
image

n8n:

or this one:

Notion:

n8n:

So I feel like I am still missing an additional step here to see the problem.

No, that’s all there is. Then I guess something is wrong with our account. I will try and contact Notion support and see.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.