Question

Payload Size Is Exceeded

  • 20 March 2023
  • 3 replies
  • 458 views

Badge

I am getting the “Payload Size Is Exceeded” error for the trigger. Can anybody help with this? Is there any

possible way to overcome this issue?

 

Thanks in advance.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @Nagamanickam 

Good question.

 

Payload size (triggers)

Constraint: When a user clicks Test Trigger in the Zap editor, the response payload must be less than 6MB.

Error messages a user could see if constraint is hit:

  • “Scripting payload too large (‘n’ bytes but max is 6291456bytes).” - (‘n’ is the number of bytes in the payload.)

Best practice: The Zap editor will only process 3 new records at a time for sample data, so one way of making sure your payload size is less than the limit is by limiting your results to 3 records.
To determine when the request is for sample data, use the bundle meta parameter bundle.meta.isLoadingSample.
When that is set to true, the user is testing in the Zap editor, and your integration can respond with a limited payload.
More on bundle.meta properties here.

Badge

Hi @Troy Tessalone 

 

Thank you for your reply. 

Can you guide me on where I need to pass this property bundle.meta.isLoadingSample to true?

If you can share a sample code document that would be super helpful.

Thanks & Regards

Nagamanickam

Userlevel 4
Badge +9

Hey @Nagamanickam 👋

The documentation @Troy Tessalone shared can be seen in full here: https://platform.zapier.com/docs/constraints#payload-size-triggers 

The CLI documentation here: https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#bundlemeta would be the best guide for using bundle.meta parameters and there’s an example of using an if to limit records requested. That applies if you’re seeing the Payload size is exceeded error during the Test Trigger portion of setting up your Zap trigger.

If instead you’re seeing this error during live polls, when the Zap is turned on, you’ll want to limit the number of records returned as described here: https://platform.zapier.com/docs/constraints#payload-size-polling-triggers to not exceed the trigger’s response payload limit of 6MB.