
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 24, 2020 08:36 AM
Hey all,
Just getting to play around with the new button field (itās awesome) and had a quick question - any idea if itās possible pull multiple emails into the āToā section of the email?
To explain further, I have two 2 tables within a base: 1 is locations and 1 is contacts. On the locations table, each location has multiple contacts linked it. Iām looking to build a button that when clicked, would include all of the contacts associated to that location into the āToā section of an email.
Appreciate any and all help!
Noah

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 24, 2020 09:27 AM
Have you tried using a Rollup field that does an ARRAYUNIQUE()
aggregation for the contactsā emails, and using that to send the emails?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 24, 2020 09:48 AM
Hi @Kamille_Parks,
Appreciate the response - unless Iām missing something with the formula, this doesnāt work (Iām unable to save). Iāve also tried this same concept with a Lookup but have not had any luck.
Maybe itās a limitation of the feature?
Thanks,
Noah

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 24, 2020 09:22 PM
To email multiple people using a mailto
URL, the email addresses must be separated by commas with no spaces. For example:
mailto:first@example.com,second@example.com
If you share the formula youāre trying to create, we can figure out how to fix it so that it creates the correct output.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 25, 2020 08:24 PM
@Justin_Barrett
Thanks for taking the time to chime in. The problem Iām having is as follows:
Using the button tool, I am able to copy the email addresses from the Lookup column displaying them and have them inserted into the ātoā section of the email - but even though they have commas in Airtable, they are being spit out in the to section without a separator (ie. john@test.comjane@test.com)
Iāve tried using both the Lookup and Rollup columns in this formula (pulling from the same property on the other table) and both spit out the emails without a separator between them.
Iāve included images of the the formula and what the final output looks like:
Any thoughts for a workaround?
Thanks,
Noah

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 25, 2020 09:31 PM
With a rollup field, use the aggregation formula: ARRAYJOIN(values, ",")
. That will force a comma between the addresses. The same would work with a lookup field, but this function would need to be part of the button field formula, to process the array from the lookup field.
That aside, I see that youāre trying to insert this into a URL to Gmail. That adds a whole new wrinkle into the process, one which you shouldāve mentioned earlier. :winking_face: I thought you were building a standard āmailtoā link, not a website URL. With that in mind, youāll also need to wrap the addresses in ENCODE_URL_COMPONENT()
so that the non-alphanumeric symbols are properly encoded for the URL. The same will also need to be done for the other values passed to the URL.
If you use the lookup field shown in your screenshot, then your formula would look like this (broken up on several lines for clarity:
"https://mail.google.com/mail/u/0/?view=cm&to="
& ENCODE_URL_COMPONENT(ARRAYJOIN(Lookup, ","))
& "&su=" & ENCODE_URL_COMPONENT(Address)
& "&body=" & ENCODE_URL_COMPONENT({Floor/Suite})

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 27, 2020 08:40 AM
@Justin_Barrett
This is super helpful - thank you so so much for clarifying in detail. For what itās worth (and likely because Iām doing something wrong on my end), this button does not work when inserting the ARRAYJOIN function straight into the rollup column aggregation formula (button is greyed out and not clickable) but it works perfectly with the Lookup column (inserting ARRAYJOIN into the buttonās URL formula).
The final question on this - Iāve tried using ā\nā to skip lines in the & ā&body=ā section of the button URL but it doesnāt seem to be picking it up. Am I doing something wrong or does the button URL formula not accept line skips?
Thanks again for your continued help!
Noah

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 27, 2020 11:05 AM
Airtable formulas do accept the newline escape code ā\nā, but Airtable doesnāt always display them properly in every location. If the record height in your table is only one line, for example, you wonāt see newlines.
However, if youāre talking about the newlines not getting through to Gmail, that may be something else. Itās possible that Gmail is expecting HTML instead of plain text, in which case you might try wrapping your paragraphs in standard HTML paragraph tags. I donāt have time at the moment to test this theory, but Iād be interested to hear what you find if you do try it.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 27, 2020 01:08 PM
Thanks Justin!
I will look into this further as itās definitely not coming through to Gmail. Will keep you posted.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āJul 28, 2020 07:52 AM
Hey @Justin_Barrett
Some snooping around and additional guidance from @JonathanBowen led me to the solution here - the ā\nā line break code needs to be within the ENCODE_URL_COMPONENT section for the line break action to carry over to Gmail. As I had it, I had closed the parenthesis of that section and included the \n after it.
Appreciate your help here.
