Send Emails with SparkPost from Google Sheets
SparkPost is a popular email delivery service that you can use to send bulk and transactional emails from Google Sheets. The Document Studio add-on for Google Workspace enables you to send unlimited emails using the SparkPost service from Google Sheets.
Verify the Sending Domain
Sign in to your SparkPost account, navigate to the Domains
section and click on the Add Domain
button.
Sending domains are used to indicate who an email is from via the "From" header. DNS records can be configured for a sending domain, which allows recipient mail servers to authenticate messages sent from SparkPost. Follow this tutorial to add a sending domain to your SparkPost account.
Get the SparkPost API Key
Inside the SparkPost account, navigate to the API Keys
section and click on the Create API Key
button. The API key is used to authenticate requests to the SparkPost API.
Give your API key a unique name and choose Transmissions: Read/Write
for the API permissions. Click the Create API Key button to save this information and generate the API key.
Connect Google Sheets to SparkPost
Install Document Studio and open your Google Sheet to launch the add-on. You may either open an existing Google Sheet or create a new sheet and add data manually.
Inside the Document Studio app, give your workflow a name and select the specific worksheet in your Google Spreadsheet that contains the merge data. Click on Continue
to move to the conditions page.
On the Conditions pane, specify if you want the email workflow to run only if the row data satisfies certain conditions. Click Continue and, on the next screen, choose Send Email
from the list of available tasks.
Choose SparkPost
from the list of available email-sending services. You can also send emails through Amazon SES, Resend, SendGrid and Google's own Gmail service.
Next, enter your SparkPost API key and the sender's email address - you can only add an email from a domain that is verified as a sending domain in SparkPost.
Configure Email Message
Specify a list of TO, CC and BCC recipients in the respective input boxes. You can specify multiple recipients in the same email, separated by commas.
If the email addresses are dynamic and listed in a spreadsheet column, you can choose the email column name from the Send Email to
dropdown.
Provide a subject and body for the email. You can use {{variables}}
in the subject and body for personalized emails. Advanced users may add Scriptlets in the email body for conditional text.
Preview and Save
Click the Preview
button and you should see a sample email sent via SparkPost to your own email address. Document Studio will take the data from the second row of the selected Google Sheet and use it to personalize the email message. Click Done
to locally apply your changes.
On the next screen, turn on the Run workflow every hour
option and the workflow will run in the background. Click the Save
button and the workflow will now appear in the workflow dashboard where you can edit, delete or manually run the workflow.