Best answer

Issue with formatting of Asana task attachments

  • 10 May 2021
  • 4 replies
  • 164 views

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.

icon

Best answer by TomWFox 25 May 2021, 14:55

View original

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

4 replies

Userlevel 7
Badge +14

Hi @TomWFox 

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.

Hi @Troy Tessalone 

Unfortunately, they do not…

 

Userlevel 7
Badge +14

Hi @TomWFox 

Might be best to open a ticket with Zapier Support to get their input on this: https://zapier.com/app/get-help

 

The advanced way would be to leverage the Asana API for this data: https://developers.asana.com/docs

App APIs can be used in Zaps via the Webhooks action: https://zapier.com/apps/webhook/integrations#triggers-and-actions

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.

90ae8ad73b2c768378f349f3ecacd1c6.png
(view larger)

In the actual JSON, they are marked by using the [ ] brackets. Those are what create the line items that you see above.

153dbdac52240b1fc555dd107e316b30.png
(view larger)

The other fields you mention don't contain the brackets in the actual JSON object, so it is considered a flat object.

44c5b17d0dfde4df820281e718db82cc.png
(view larger)

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 🤷‍♂️