Facebook Marketing API Ads - JSON nested

Hello,

I’m getting from Facebook Marketing API , data from ads.
The API returns me an JSON, I tried to use the ItemList, but one of the item have multiple data inside and i’t seens i cant take out in columns.

The Node;

I would like to have this result of the first element:

campaign_name:[VENDA][ABRIL-22][EMAGRECIMENTO]
adset_name:[EMAGRECER CERTO][AUTO][30-55]
ad_name:H - AD01
spend:144.2
impressions:5889
reach:5330
clicks:82
onsite_conversion.post_save:3
link_click:55
post:2
post_reaction:6
landing_page_view:47
offsite_conversion.fb_pixel_initiate_checkout:2

I would like to have this result of the first element:
(…)

So, you essentially want to move each element of the actions array into its own column, right? If the possible action_type values are unknown, I think this would require a bit of custom code I think. Unfortunately, you appear to have the data from the question template when posting, so I don’t know which n8n version exactly you are running. In case you’re using the latest n8n version 0.201.0, this should do the job:

Result:

Hope this helps!

1 Like

MutedJam,

Worked perfectly.

Thank you very much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.