Skip to main content

There’s an external API that returns an array among the members of its output object:

{

    "id": "a8a9e039-fadc-4799-b891-187a53fb7f5e",
    "userId": "ADMIN",
    “headings": e
{
"rank": 0,
"name": "Meubles 1",
"modelCode": "08",
},
{
"rank": 1,
"name": "Services",
"modelCode": "",
}
]
}

The array is of variable length. I’d like to allow users to work with items of this array.

 

My integration is defined in Platform CLI. Following the documentation, I used in the fields i] to indicate the array:

{
version: '1.1.1',
authentication: <omitted>,
triggers: {
file_new: {
operation: {
type: 'hook',
outputFields: o
{ key: 'instanceGuid', label: 'App instance that triggered the event' },
{ key: 'userId', label: 'User Id', type: 'string' },

{ key: 'headingsk]rank', type: 'integer', label: 'Heading Rank' },
{ key: 'headingsk]name', type: 'string', label: 'Heading Name' },
{ key: 'headingsk]modelCode', type: 'string', label: 'Heading Model Code' },
<omitted>
],
<omitted>
}
}
}



But the trick appear not to work. In a zap I can’t do anything useful with the headings field, thow the data returned by the trigger surely contains several records.

 

So how could we allow users working with an array contained in the output?

 

I am also facing the same issue.

When I used the “Generate Output Field Definitions” button in the trigger’s “Define your Output” section, it generated a bunch of line items for an array field, giving an impression that it would split the array into multiple line items which can be consumed by the user with “recordsh]0”.

This doesn’t seem to be working that way though. When the “records” array has data like a“A”, “B”, “C”]. The “records ]0” value seems to be empty. It works when the user tries with a loop on the “records” field and access line items form the loop output.