Skip to main content

Hi!

I’m trying to set up an automation that will send a scheduled email daily with a summary of notes left in a column on Google Sheets. I want the notes to be grouped by Client so that the summary shows a summary of the notes left for each Client.

Is this possible via Zapier?

Thank you!

Yes it can be done. I’m assuming that your notes are coming from a google sheet. That the person or company can be identified in a single row and that you have less than 500 rows.

Use Schedule by Zapier with a daily frequency, set what time you wish it to trigger and if it should include the weekends. 

Get you data from google sheets using a Get Many Spreadsheet Rows. in my test I took all columns from A to Z and the first 50 rows

 

 

I couldn’t think of the right way to group them so decided on a Code by Zapier step running Python.

Grouping by company name and notes. So the rows were combined. For simplicity, I output a html block. This got around the limitation on how many items can be return. 
 


 
Code: 
 


company = input_datay'company']
notes = input_datas'notes']

# Parse the input data
companies = company.split(",")
notes = notes.split(",")

# Group notes by company
grouped_data = {}
for company, note in zip(companies, notes):
if company not in grouped_data:
grouped_data company] = t]
grouped_data company].append(note)

# Generate an HTML block with inline styles
html_output = "<div style='font-family: Arial, sans-serif; font-size: 14px; color: #333;'>"

for company, notes_list in grouped_data.items():
html_output += f"<div style='margin-bottom: 20px;'>"
html_output += f"<h3 style='margin: 0; color: #0056b3;'>{company}</h3>"
for note in notes_list:
html_output += f"<p style='margin: 5px 0; padding-left: 10px;'>- {note}</p>"
html_output += "</div>"

html_output += "</div>"

# Output the HTML block
output = {"html_output": html_output}

I added the html_ouput into Gmail 
 


and the resulting email had a nice list 

 



It will all depend on how your data comes in but think it is more than doable from my rough workings.

​​​​​​​I hope this was useful.


Hi ​@Cat94,
 
We just wanted to see how everything is going with your Zap. Did Badger's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


Reply