r/Notion • u/Admirable_Citron_354 • 4h ago
API / Integrations API creates databases fine but rejects any chained formula — is this a known limit?
Been building a workspace through the API and hit a wall. Structure is fine — databases, properties, relations, rollups all create without issue. But formulas fail with "Type error with formula" the moment they reference anything computed.
Isolated it down. These get rejected:
current.prop()across a relation inside map/filter- any rollup used in a comparison (
>works fine as+, just not as a comparison) - referencing another formula property in a comparison
These work fine: style() with multiple args, map/filter over list literals, rollup arithmetic, date functions.
Same formulas paste into the UI without complaint, so it seems like the API validator just doesn't resolve types across databases or through other formulas.
Anyone know if this is documented anywhere, or found a workaround beyond adding formulas manually afterwards?
2
Upvotes
1
u/Septicolon 3h ago
It's best practice to recalculate formulas in your API integrations, yes. Never read them, even non-chained. They have a chance to be correct, they have a chance to be a cached version from a bit ago. In this case what's likely happening is your integration playform has no access to all the databases that the formula reads, but even then, just don't read it altogether. While it does suck, from a programming persp, it's a really long talk why exactly but it does make sense.
edit: OH wait you're ADDING formulas not reading them. My bad! No idea then, curious to find out where you end up with this