What are you trying to achieve?
I’m trying to automatically generate the next order number in Notion using Make.
Each time a new order is submitted, I want Make to:
1. Look up the latest existing order number from a Notion database property (stored as rich text),
2. Convert that value to a number,
3. Add 1 to it,
4. Write the result into a Number field in Notion called Order Number.
The entire flow works until the last step, where Make seems to treat the number as plain text and causes a validation error in the Notion module (Invalid number in parameter ‘z_Tg’). I want the value to be treated and inserted as a true number, not a string.
Steps taken so far
- Created a Notion database with a rich text field called Order ID (Text) and a number field called Order Number.
2. Used the Notion “Search Objects” module to retrieve the latest submitted order and get the value from the Order ID (Text) field.
3. Added a Tools > Set Variable module with this expression:
add(1; toNumber(ifempty(get(1; “properties.Order ID (Text).rich_text[0].plain_text”); 0)))
4. Tried wrapping the output in toString(…) and eval(…) as well, but it didn’t change the result.
5. Mapped the output to the Order Number field in the Notion Create/Update module.
6. Keep getting a BundleValidationError with the message:
“Invalid number in parameter ‘z_Tg’.”
7. Also tried changing the Order Number field in Notion from a number to a text field, but that caused other problems.