โ10-19-2023 01:46 AM
Hey Folks,
I'd need a little support for a recepie: The recepie should delete all contacts in a google adressbook (will be purge once a week).
What I've achieved so far:
- I can get a list of all google contacts with a custom goole Action
- I can add each resourceName (the ID of the google contact) to a list (Accumulate)
- I can batchdelete ONE contact, so I know the json syntax, etc.
But: I dunno how to add ALL the items from the list to the json
If I add the item from the list (or even from the first HTTP response) to the JSON request body to the data field, it takes only the first item and does not create a json in the response with all list items.
btw: I tried to delete one contact after the other with the "deleteContact" method by the api which leads to an error after approx.5 deletions for too many requests. So batchDeleteContacts might be the right for me:
https://developers.google.com/people/api/rest/v1/people/batchDeleteContacts
And batchdelete works already with one contact. But need to add the list to the Post request.
Thanks in advance for your help.
Solved! Go to Solution.
โ10-19-2023 09:33 AM
If you already have a list of resourceNames, you should be able to do [list].pluck('resourceName')
This will return a 1D array like ["abc","def","ghi"] which matches the documentation link you sent.
In your HTTP call, create a field called "resourceNames" and drop in the message/array data pill as the value.
That should do it. If this doesn't work, send some screenshots and we'll figure it out.
โ10-19-2023 09:33 AM
If you already have a list of resourceNames, you should be able to do [list].pluck('resourceName')
This will return a 1D array like ["abc","def","ghi"] which matches the documentation link you sent.
In your HTTP call, create a field called "resourceNames" and drop in the message/array data pill as the value.
That should do it. If this doesn't work, send some screenshots and we'll figure it out.