Search code examples
zapier

Zapier: Split a string in array of objects


I have a requirement to split a string of comma-separated userIds into an array of objects.

Transform

"123,456,789"

into

[{"id":"123"}, {"id":"456"}, {"id":"789"} ]

How can I do this in Zapier? We can use formatter and split the string into an array. But how can I get an array of objects?


Solution

  • We can do that by custom code steps:

    https://zapier.com/help/code/
    https://zapier.com/help/code-python/
    

    Alternatively, one could create an app via our developer platform, which would let you create a private integration for your own Zapier account: https://platform.zapier.com