We had a community member recently who was trying to trigger a Zap with a Google Calendar event, then retrieve multiple rows from a Google Sheet and send the information in Gmail.
The sheet looked something like this:
And the goal was to send it an email so the recipient received this:
They had initially tried using the Get Many Spreadsheet Rows (Advanced, With Line Item Support) action in Gogle Sheets, which is a great idea because you can just specify how many rows to return instead of searching by a specific value:
The tricky thing is that this is the output:
Without using something like a Code step, it’s tricky to get the text in the desired format.
Given that the Zap is being triggered by Google Calendar I thought that you could add a Date column in the Google Sheet and use the Find Many Spreadsheet Rows (With Line Item Support action, using that Date column with the
Pretty Date field from Google Calendar. So for everyone you want to send in the email, you add the date that corresponds to the event.
The output of that Google Sheet action is more manageable:
Formatter to the Rescue
You can now build what you want each line to look like:
What I’ve done there is map the Number field, followed by a period and a space, then the Name field with > and then the Character field. The result:
Now we have something nice and tidy to map to the Gmail step:
And sure enough, the recipient will see it in the desired format:
Hope you’ve found this helpful! Untl next Wednesday!