How do I add multiple rows to a Google sheet from a complex object returned from a previous step?

This topic was automatically generated from Slack. You can find the original thread here.

Daler : Hi, everyone. Sorry, not a programmer, so maybe an annoying question. I am trying to get the list of names and emails from Zoom webinar attendance report to Google Sheets. How do I add the full list into Sheets? I am able to add individual person’s record one by one using add_single_row with {{steps.get_meeting_participants.$return_value.participants[0].name}} in a Cell field, but have no idea how to add them all from that webinar, each one in a new row, without having to manually add [1], [2], [3] in return_value.participants. Thanks for any pointers!

Dylan Sather (Pipedream) : thanks for reaching out. I think this example from the docs will be really helpful for you. It shows you how to take an array of “complex” values and transform it into the format Google expects. Once you transform the data, you can pass it to the Add Multiple Rows to Sheet action, adding all rows to your sheet at once.

The format of the data in that example seems pretty close to the format you describe, so you should be able to do something like this in step 2:

return steps.get_meeting_participants.$return_value.participants.map((participant) => [
  participant.name,
  participant.email,
]);

(you may have to adjust the names / order of the fields)

Daler : Thank you very much!