Skip to main content
Question

Automation script returning empty value if field type is array, Ok for String

  • July 25, 2025
  • 3 replies
  • 56 views

Forum|alt.badge.img+2
  • Participating Frequently
  • 8 replies

I think this is a new issue, but now when I try to return an array (as a list) from an Automation, the value is empty. If I convert it to a string, it returns the string value (see code and output below).

The array looks ok in console.log(). It’s just a series of ID numbers.

 

 

 

3 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, as a datapoint this seems to work fine for me:


Alexey_Gusev
Forum|alt.badge.img+25
  • Brainy
  • 1261 replies
  • July 26, 2025

It should work.

 


Try to use slice function on array to cut part of it
let arr2=arr1.slice(0,5)
or try simple filtering
let arr2=arr1.filter(Boolean)

i tried to use  JSON.stringify(arr) - it creates a string like ,toString but with square brackets.
the difference is when you output array as array, it can be used for repeated group, string - cannot.


airvues
Forum|alt.badge.img+7
  • Inspiring
  • 62 replies
  • July 27, 2025

Hi ​@mpalsf , Airtable’s output.set() can only serialize some types of data. Most likely your array is not a pure string array, but instead it might be an array of objects. The additional object metadata is probably what is causing the issue with showing this in the output.set(). If you share more of your code or a console log of the rtnArray, I can be more sure about the issue and can help you with some tweaks in your function to just get an array of IDs. Hope this helps!