Help

Aggregate rows with same values for email sendout

Topic Labels: Automations
492 1
cancel
Showing results for 
Search instead for 
Did you mean: 
snowflake123
4 - Data Explorer
4 - Data Explorer

Dear Airtable community,

I'm working on an automated email sendout where I would like to let the recipient know which order and delivery dates will be applicable within a holiday week. To make it as easy as possible for the reader, I basically joined one big text field based on the data input, for example "order will be placed on 28-12-2023 for 02-01-2024". Now, I'm looking for a way to aggregate my output - kind of like a pivot before showing all fields. 

Data format:

CityRecipientText
BerlinBerlin1order will be placed on 28-12-2023 for 02-01-2024
BerlinBerlin2order will be placed on 28-12-2023 for 02-01-2024
HamburgHamburg1order will be placed on 29-12-2023 for 02-01-2024
FrankfurtFrankfurt1order will be placed on 28-12-2023 for 03-01-2024

How can I aggregate the information so my vendor only receives the following information:

CityText
Berlinorder will be placed on 28-12-2023 for 02-01-2024
Hamburgorder will be placed on 29-12-2023 for 02-01-2024
Frankfurtorder will be placed on 28-12-2023 for 03-01-2024

Any help would be much appreciated 🙂

1 Reply 1

I don't know how to do that with Airtable's automations, but I'm sure that it can be done with a custom Javascript script. I don't know Javascript, but hopefully someone will chime in below to help you write a script.

In the meantime, I have all of my Airtable consulting clients doing this exact thin by using Make's Table Aggregator. Check out the screenshot below, and you can see at the bottom that there is a "Group By" function. That's how you can merge rows that have identical values into one row in your table.

Alternatively, you may be able to restructure your database in such a way where each city only shows once in the table that you're pulling your emails from.

Screenshot 2024-01-15 at 11.20.27 AM.png