Zapier · tool · fg-0368

Code by Zapier fails with 'Scripting payload too large' or the 250 item output limit

If you see Scripting payload too large, the cause and the fix for Zapier are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Scripting payload too largeYou cannot return more than 250 items from a Code actionProcess exited before completing request
Cause
Code steps run on AWS Lambda with a 6 MB cap on code plus data, and output is limited to 250 items. A fetch chain without a catch can also exit silently.
Fix
Return only the fields you need, split large arrays across steps, and await fetch inside try and catch.
Apply
try { const r = await fetch(url); const all = await r.json(); return { ids: all.items.slice(0, 250).map(i => i.id).join(',') }; } catch (err) { return { error: String(err) }; }
Affected
Code by Zapier JavaScript and Python, all plans, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun