Automating the sending of invites to events can be a real time-saver. It’s also a nice touch to send a custom, and personalized, message. To make this happen, we’re using Coda’s Gmail Pack and a button.
Instead of just sending out an email anytime an update is made, we want to track the people we’ve already sent and invite to so we can add more attendees later and not spam anyone with repeat emails. To make this happen, we create a new column called Emailed Invite [People]. Anytime we send an email invite, we want to record the person here so we have a running log.
For our “Send Invite” button, we can then use a formula to run two actions; send an email and record the person. This is the formula...
The first part of the formula creates the list of people. We find the Attendees and then filter them to find only the people that are Not() contained in the Emailed Invite column already.
Then we use a FormulaMap() to go through each person in this list individually so we can send a personalized email and then add them to the list of emails sent.
With RunActions() we’re able to create a comma separated list of actions we want the button to run. First we Gmail::SendEmail() which sends the email and second we ModifyRows() which will add that person to our list.
Our Splice() formula will take the current list in Emailed Invite and splice in the new person being added. So this list can keep growing. Our in-doc templates for voting use this formula as well if you want to see how it works in other examples.
Disable the button
If everyone has already received an invite email, we can show this button as disabled by using the following formula in the “Disable” field...
We’re simply checking to see that all Attendees are listed in the Emailed Invite column.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (