Goal: pull Leads from Get Insights → actions and write to Google Sheets (daily/weekly automation).
Tried:
-
{{ map(X.actions; value; action_type; "lead") }} -
{{ sum(map(X.actions; number(value); action_type; "lead,onsite_conversion.lead_grouped")) }} -
With and without
Array aggregator, triedvalue__sumandget("value [sum]").
Issues:
-
Constant DataError (
{empty}or invalid key), even whenactionsclearly contains multiplelead-related entries. -
When I do manage to isolate
lead, it behaves as if the value doesn’t exist on its own — like the match only exists in a broader structure and can’t truly be extracted. -
Also saw “message too short” errors in
Log(just UI, not logic-related).
Ask:
-
A working example to reliably extract
leadvalue fromactions, without breaking other metrics. -
Best pattern for handling edge cases (missing
actions, JSON string, etc.). -
Is it better to just use Facebook Lead Ads → Watch Leads instead of
Get Insightsfor this?
Any help from someone experienced would be appreciated ![]()