Re: Automations: Script Action Maximum Output Size

801 0
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

The documentation for Script Actions states the following regarding the output API:

The output API can currently return a maximum of 6MB of data.

There are three ways I can see this being interpreted, and I’m not sure which is correct:

  1. Each individual call to output.set() has a 6MB limit
  2. Within a single Script Action, multiple calls to output.set() have a cumulative limit of 6MB
  3. Within a single Automation with multiple Script Actions, all Script Actions put together have a cumulative limit of 6MB for calls to output.set()

Does anyone know which of these is correct?

1 Reply 1
6 - Interface Innovator
6 - Interface Innovator

I decided to see if I could answer this myself, and set up some tests. As it turns out the answer is #2, with an additional caveat.

Here’s what the actual limit is—The output and input APIs both have a hard cap of 6MB per Script Action. Within a single Script Action, you can input up to 6MB of data using the input API, and output up to 6MB of data using the output API (6MB in plus 6MB out).

If you have an automation with many Script actions, there is no limit on the total cumulative amount of output data shared between all of the actions. The limit only applies within a single action. If you have multiple actions outputting data, you can input data from several actions into future action, but you still have to respect the 6MB limit.

For example, let’s say you have 4 Actions. Actions A, B, and C each output 3MB apiece. Action D uses the output data from those previous actions. If Action D inputs 3MB from Action A and 3MB from Action B, it is within the 6MB limit so everything is fine. If however, you try to input the 3MB data from all 3 actions into Action D, the script will fail with an “unknown error” because you have exceeded the 6MB limit.

Hope this helps someone in the future!

Screen Shot 2022-03-04 at 12.28.50 AM

Technical Note:

I fudged the numbers a little bit…even though Airtable specifies 6MB (ie. megabytes, or 6,000,000 characters) as the output limit, based on my testing it actually seems to be closer to 6MiB (ie. mebibytes, or 6,291,456 characters) for the entire output payload (including the length of the output variable names, and possibly other metadata). So to be safe, it’s easier to just treat the limit as 6MB and leave the extra ~290KB as headroom.