I feel like I’m tripping but the way Zapier presents the Attachments object returned by the New task in Project in Asana trigger is different to how it presents the other objects.
From testing the trigger:
Then Zapier gives you:
As you can see, Attachments has no data and then you get the values name, id etc as separate entities for each attachment.
Looking at custom fields, it appears to have the same structure:
However, Zapier gives you the values grouped in a sort of array:
Why the difference?
The issue this is causing me is that I can’t (at least easily) use looping by zapier to loop through the unknown number of attachments.
Best answer by TomWFox
For anyone interested below is the response I had from Zapier support…
What you are seeing is how the JSON object is structured. You are correct. In this example, the data is nested in an array or line items.
While you don't actually see this in the sample output, this is how it is built under the hood, so to speak. I hope that this helps!
It seems weird and somewhat unhelpful for items with different underlying JSON to be displayed in the same way in the ‘sample output’ but there you go 🤷♂️
Can you show the full list of “Attachment” related data points returned when searching for “Attachment” when doing a ‘Custom’ mapping for a data point.
Wondering if in addition to each Attachment getting it’s own data point, if those also appear as array data points.
While you don't actually see this in the sample output, this is how it is built under the hood, so to speak. I hope that this helps!
It seems weird and somewhat unhelpful for items with different underlying JSON to be displayed in the same way in the ‘sample output’ but there you go 🤷♂️