Make.com LabIntermediate
Round Up with ceil() in Make.com
An API returns 10 records per page and tells you the total count. Calculate how many pages you need to request in a Repeater.
Live Execution Simulator
Idle
π₯
Incoming Data
βοΈ
Make.com Node
π―
Next Step
> Ready. Type your expression below and click "Check Answer" to run the node.
Incoming Payload / Data:
{
"total": 42,
"per_page": 10
}
Press Enter or click Check Answer. +20 XP
β Solution & explanation
ceil(total / per_page)
Output: 5
42 Γ· 10 = 4.2.
ceil() always rounds up, giving 5 pages β the 5th page holds the last 2 records. floor() would round down and lose them.π‘ Pro tip: Feed this value into a Repeater module's Repeats field to loop through every page.
Also accepted: ceil(total/per_page)