{"id":22121,"date":"2022-11-22T23:23:21","date_gmt":"2022-11-22T23:23:21","guid":{"rendered":"https:\/\/www.gmass.co\/blog\/?p=22121"},"modified":"2024-05-21T18:50:47","modified_gmt":"2024-05-21T18:50:47","slug":"trigger-transactional-email-google-sheet","status":"publish","type":"post","link":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/","title":{"rendered":"How to Trigger a Transactional Email to New Rows in a Google Sheet"},"content":{"rendered":"<div class=\"alert alert-info\" style=\"text-align: center;\"><em><strong>Update: <a href=\"https:\/\/www.gmass.co\/blog\/instantly-send-new-rows\/\">Instant emails in recurring campaigns<\/a> is now a native GMass feature. You no longer need to use this workaround. However, if you&#8217;d like to (for whatever reason), it&#8217;s preserved here&#8230;<\/strong><\/em><\/div>\n<p>Here\u2019s a question that recently came out of the\u00a0<strong>GMass Facebook community<\/strong>. (And hey, you should definitely <a href=\"https:\/\/www.facebook.com\/groups\/662990762120154\">join the group<\/a>, we\u2019re having some great email strategy and GMass discussions over there.)<\/p>\n<p>Alan asked: <em>&#8220;Is there a way to get Google Sheets to trigger a\u00a0transactional email\u00a0when a new row is added (i.e. a person signs up)?&#8221;<\/em><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22137\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified.png\" alt=\"Question from Facebook group on triggered transactional emails\" width=\"1394\" height=\"488\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified.png 1394w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-300x105.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-1024x358.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-768x269.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-36x13.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fbmessage-tinified-48x17.png 48w\" sizes=\"auto, (max-width: 1394px) 100vw, 1394px\" \/><\/a><\/p>\n<p>GMass can check the sheet hourly for new rows with the\u00a0<a href=\"https:\/\/www.gmass.co\/blog\/recurring-automated-email-campaigns-gmail-sheets\/\">recurring campaign<\/a>\u00a0feature. So if you want to get an email to someone the moment they sign up, odds say there will be a longer delay&#8230; in fact, they might be waiting up to 59 minutes.<\/p>\n<p>You could use the\u00a0<a href=\"https:\/\/www.gmass.co\/blog\/guide-to-zapier-integration\/\">GMass Zapier integration<\/a>\u00a0to trigger a transactional email to new rows. But even on the more expensive paid plans there\u2019s still up to a two-minute delay. Plus, there&#8217;s a limit on how many times you can use the action per month.<\/p>\n<p>So I put together a\u00a0<a href=\"https:\/\/developers.google.com\/apps-script\">Google Apps Script<\/a>\u00a0that you can use to\u00a0<strong>automatically fire off an instant transactional email whenever you add a new row (containing a new contact) to a Google Sheet<\/strong>.<\/p>\n<p>(By the way, this would pair well with our methods for\u00a0<a href=\"https:\/\/www.gmass.co\/blog\/emails-web-form-google-sheets\/\">how to get subscriber emails from a web form into Google Sheets<\/a>.)<\/p>\n<p>Here\u2019s a\u00a0<strong>step-by-step guide<\/strong>\u00a0to set up a script to send\u00a0<strong>instant, automated transactional emails for your Google Sheet<\/strong>.<\/p>\n<h2>Triggered Transactional Emails: Before We Begin<\/h2>\n<p>A few quick notes before we begin:<\/p>\n<ul>\n<li>Google Apps Scripts involve JavaScript code. Fortunately, in this article, you\u2019ll find a step-by-step walkthrough that should just involve cutting and pasting. However, <strong>if you want to modify this script in any way, that will require some comfort with coding<\/strong>.<\/li>\n<li>I\u2019m a writer by trade who\u2019s self-taught some coding over the years. I\u2019m not a developer. So while this code works and it\u2019s safe, I\u2019m sure it\u2019s not as efficient as it potentially could be. The good news? I hear rumors that\u00a0<a href=\"https:\/\/evan-soohoo.medium.com\/did-elon-musk-really-fire-people-using-lines-of-code-as-his-metric-15c17254ed33\">writing inefficient, lengthy code is now good for your career<\/a>.<\/li>\n<\/ul>\n<p>Let\u2019s get rolling.<\/p>\n<h2>Google Apps Script for Sending Transactional Emails to New Rows in a Google Sheet (via the GMass API)<\/h2>\n<h3>Step 1: Create your Google Sheet<\/h3>\n<p>The first thing we need is a\u00a0<strong>Google Sheet to collect your email addresses<\/strong>. (And to send these transactional emails to those addresses.)<\/p>\n<p>Create a new Google Sheet.<\/p>\n<p>For simplicity, I\u2019ve made the first column\u00a0<strong>EmailAddresses<\/strong>\u00a0and the last column\u00a0<strong>Sent<\/strong>\u00a0(that column will automatically update when the transactional email goes out).<\/p>\n<p>You can add columns in between for any other recipient data; you\u2019d need to alter the code if those columns are anywhere but first and last. You\u2019ll also need to alter the code if you want to incorporate the data from those columns (like names and so on) in your transactional email.<\/p>\n<h3><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22136\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified.png\" alt=\"Create a Google Sheet for your campaign\" width=\"1804\" height=\"1106\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-300x184.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-1024x628.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-768x471.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-1536x942.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-24x15.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sheetsetup-tinified-48x29.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/h3>\n<h3>Step 2: Create a trigger action<\/h3>\n<p>The first part of our Google Apps Script journey involves creating a custom trigger so Google Sheets knows when to send a transactional email. I find the custom triggers give us a bit more control than Google\u2019s built-in triggers, so I\u2019m using one here.<\/p>\n<p>Go to the\u00a0<strong>Extensions<\/strong>\u00a0menu in your Google Sheet. Select\u00a0<strong>Apps Script<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22135\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified.png\" alt=\"Select Apps Script in the Google Sheets menu\" width=\"1804\" height=\"1106\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-300x184.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-1024x628.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-768x471.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-1536x942.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-24x15.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-appsscript-tinified-48x29.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<p>Give your project a name up top.<\/p>\n<p>Then delete all the default code in the window.<\/p>\n<p>And paste in the following code.<\/p>\n<p class=\"codepen\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-height=\"300\" data-default-tab=\"js\" data-slug-hash=\"KKeQjjv\" data-user=\"samgmass1\">See the Pen <a href=\"https:\/\/codepen.io\/samgmass1\/pen\/KKeQjjv\"><br \/>\nUntitled<\/a> by Sam G (<a href=\"https:\/\/codepen.io\/samgmass1\">@samgmass1<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>Here\u2019s how it should look inside the Google Apps Script window.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22134\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified.png\" alt=\"Code in Google Apps Script window\" width=\"1804\" height=\"982\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-300x163.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-1024x557.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-768x418.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-1536x836.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-24x13.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-36x20.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerscript-tinified-48x26.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<p>Now click the floppy disk icon to save, then click the Run button.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22133\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified.png\" alt=\"Save and run the trigger\" width=\"1804\" height=\"924\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-300x154.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-1024x524.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-768x393.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-1536x787.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-24x12.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-36x18.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-saveandrun-tinified-48x25.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<p>Google will think about it for a moment, then ask you to\u00a0<strong>give the script permissions to run<\/strong>. Give it all the permissions for which it asks.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified.png\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22132\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified.png\" alt=\"Review permissions for your trigger\" width=\"1804\" height=\"1162\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-300x193.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-1024x660.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-768x495.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-1536x989.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-24x15.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-36x23.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-givepermissions-tinified-48x31.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22131\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified.png\" alt=\"And more permissions\" width=\"1804\" height=\"1422\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-300x236.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-1024x807.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-768x605.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-1536x1211.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-24x19.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-36x28.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-allowscript-tinified-48x38.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<p>Assuming nothing went weird, you should get a message in your Execution log saying\u2026 \u201cExecution completed.\u201d Love that enthusiastic, triumphant phrasing there by Google.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22130\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified.png\" alt=\"Your script was successful\" width=\"1908\" height=\"1150\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified.png 1908w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-300x181.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-1024x617.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-768x463.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-1536x926.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-24x14.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-executioncomplete-tinified-48x29.png 48w\" sizes=\"auto, (max-width: 1908px) 100vw, 1908px\" \/><\/a><\/p>\n<p>And if you click the stopwatch icon on the left (which is your list of triggers) you\u2019ll see your new trigger is live.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified.png\" data-rel=\"lightbox-image-8\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22129\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified.png\" alt=\"See your trigger live\" width=\"1908\" height=\"1150\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified.png 1908w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-300x181.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-1024x617.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-768x463.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-1536x926.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-24x14.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-triggerislive-tinified-48x29.png 48w\" sizes=\"auto, (max-width: 1908px) 100vw, 1908px\" \/><\/a><\/p>\n<p>Leave this browser tab open and go to the next step.<\/p>\n<h3>Step 3: Grab your GMass API key<\/h3>\n<p><strong>You\u2019ll need a GMass API key<\/strong>\u00a0to make this work; that key is required to send a transactional email through GMass.<\/p>\n<p>Head into your GMass\u00a0<a href=\"https:\/\/app.gmass.co\/dashboard\/index\">dashboard<\/a>. Open the\u00a0<strong>Settings<\/strong>\u00a0by clicking the gear icon on the top right, then click into the\u00a0<strong>API Keys<\/strong>\u00a0section. Click\u00a0<strong>Manage API Keys<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified.png\" data-rel=\"lightbox-image-9\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22127\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified.png\" alt=\"Get your API key for GMass\" width=\"1908\" height=\"1150\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified.png 1908w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-300x181.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-1024x617.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-768x463.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-1536x926.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-24x14.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-36x22.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-apiindash-tinified-48x29.png 48w\" sizes=\"auto, (max-width: 1908px) 100vw, 1908px\" \/><\/a><\/p>\n<p>If you\u2019ve never created an API key before, make a new one with the red button. Then click the clipboard icon to copy your API key. (Or leave this window open, since we\u2019ll do more copying and pasting in between now and when it\u2019s time to use this key.)<\/p>\n<h3>Step 4: Create the script to send your transactional email<\/h3>\n<p>We\u2019ll now need to create a second script. The first script created the trigger; this second and final script will actually send the email.<\/p>\n<p>Return to the tab with the Apps Script editor. Go back into the code editor in Google Apps Script (the symbol is the left and right carats). Then click the\u00a0<strong>plus sign next to Files to add a new script<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified.png\" data-rel=\"lightbox-image-10\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22128\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified.png\" alt=\"Add another script to Google Apps\" width=\"1908\" height=\"904\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified.png 1908w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-300x142.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-1024x485.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-768x364.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-1536x728.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-24x11.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-36x17.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-addnewscript-tinified-48x23.png 48w\" sizes=\"auto, (max-width: 1908px) 100vw, 1908px\" \/><\/a><\/p>\n<p>Then paste in the following code:<\/p>\n<p class=\"codepen\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-height=\"300\" data-default-tab=\"js\" data-slug-hash=\"gOKvVYP\" data-user=\"samgmass1\">See the Pen <a href=\"https:\/\/codepen.io\/samgmass1\/pen\/gOKvVYP\"><br \/>\nSend transactional email<\/a> by Sam G (<a href=\"https:\/\/codepen.io\/samgmass1\">@samgmass1<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>You\u2019ll need to <strong>replace all the ALL CAPS in there with your info<\/strong>.<\/p>\n<ul>\n<li>Your email address (the \u201cfrom\u201d address for the transactional email)<\/li>\n<li>Your name (who the email will show it\u2019s from)<\/li>\n<li>Your subject line for the transactional email<\/li>\n<li>Your message for the transactional email<\/li>\n<li>Your API Key<\/li>\n<\/ul>\n<p>You can also add\u00a0<a href=\"https:\/\/api.gmass.co\/docs%23tag\/Transactional\">other options<\/a>\u00a0from the API like CC, BCC, open tracking, and click tracking.<\/p>\n<p>Here\u2019s how it looks for me:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified.png\" data-rel=\"lightbox-image-11\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22125\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified.png\" alt=\"Final code in Google Apps\" width=\"2152\" height=\"1968\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified.png 2152w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-300x274.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-1024x936.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-768x702.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-1536x1405.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-2048x1873.png 2048w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-24x22.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-36x33.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-fullscript-tinified-48x44.png 48w\" sizes=\"auto, (max-width: 2152px) 100vw, 2152px\" \/><\/a><\/p>\n<p>Now click the floppy icon to save it, then click Run. Yeah,\u00a0<strong>you\u2019ll have to give<\/strong>\u00a0<em><strong>this<\/strong><\/em><strong>\u00a0script permissions all over again<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified.png\" data-rel=\"lightbox-image-12\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22126\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified.png\" alt=\"Permissions to run again\" width=\"2154\" height=\"1608\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified.png 2154w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-300x224.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-1024x764.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-768x573.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-1536x1147.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-2048x1529.png 2048w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-24x18.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-36x27.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-morepermissions-tinified-48x36.png 48w\" sizes=\"auto, (max-width: 2154px) 100vw, 2154px\" \/><\/a><\/p>\n<p>Once you\u2019ve given the permissions, the script should execute\u2026 but no email will go out because you don\u2019t have any email addresses in the spreadsheet yet. (We needed to preemptively run it here, though, for the sake of giving it permissions.)<\/p>\n<p>Head into your spreadsheet and enter one of your email addresses into the EmailAddress column, then hit Return\/Enter or Tab.<\/p>\n<p>The script will take a moment to process. Give it up to 30 seconds (usually a lot less) and the word \u201cSent\u201d will appear in the Sent column.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified.png\" data-rel=\"lightbox-image-13\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22124\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified.png\" alt=\"The script adds Sent when the email is sent\" width=\"1868\" height=\"1092\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified.png 1868w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-300x175.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-1024x599.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-768x449.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-1536x898.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-24x14.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-36x21.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-sent-tinified-48x28.png 48w\" sizes=\"auto, (max-width: 1868px) 100vw, 1868px\" \/><\/a><\/p>\n<p>And when you head over to your email account, the transactional email should be there waiting for you.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified.png\" data-rel=\"lightbox-image-14\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22123\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified.png\" alt=\"There's your email\" width=\"2128\" height=\"1206\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified.png 2128w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-300x170.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-1024x580.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-768x435.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-1536x870.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-2048x1161.png 2048w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-24x14.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-36x20.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-successfulemail-tinified-48x27.png 48w\" sizes=\"auto, (max-width: 2128px) 100vw, 2128px\" \/><\/a><\/p>\n<h3>What if you want to edit info in the spreadsheet \u2014 will it send another email to that address?<\/h3>\n<p>Google doesn\u2019t have an \u201conNewRow\u201d function; we have to use its onChange function for this script. That means every time you change any info in the spreadsheet, this transactional email script will run. And your recipients could start getting transactional emails over and over.<\/p>\n<p>We don\u2019t want that. So I built a failsafe into the script so\u00a0<strong>if you\u2019re editing any of your contacts in the Google Sheet, they won\u2019t get repeated emails<\/strong>.<\/p>\n<p>Before the script sends an email, it checks the Sent column. If an email\u00a0<em>has<\/em>\u00a0been sent, no new email will go out \u2014 and an alert will pop up to confirm no email was sent.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified.png\" data-rel=\"lightbox-image-15\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-22122\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified.png\" alt=\"The script won't send multiple emails to one person\" width=\"1804\" height=\"1152\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified.png 1804w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-300x192.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-1024x654.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-768x490.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-1536x981.png 1536w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-24x15.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-36x23.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/tatrig-noemailsent-tinified-48x31.png 48w\" sizes=\"auto, (max-width: 1804px) 100vw, 1804px\" \/><\/a><\/p>\n<h2>You\u2019re All Set!<\/h2>\n<p>We\u2019re now\u00a0<strong>good to go<\/strong>\u00a0\u2014 whenever you add a new row to this spreadsheet, a transactional email will go out to the address in that row.<\/p>\n<p>As I mentioned earlier, this script would go great with the methods we detailed for\u00a0<a href=\"https:\/\/www.gmass.co\/blog\/emails-web-form-google-sheets\/\">getting emails from a web form into a Google Sheet<\/a>. That way, people could subscribe to your list on your website, those addresses would go into your Google Sheet, and they\u2019d automatically receive a transactional email instantly.<\/p>\n<p>From there, you could use GMass\u2019s\u00a0<a href=\"https:\/\/www.gmass.co\/blog\/recurring-automated-email-campaigns-gmail-sheets\/\">recurring feature<\/a>\u00a0to automatically send a more proper, robust welcome email (or the first email in a welcome series) to that recipient sometime within the next hour.<\/p>\n<p><strong>If you\u2019re not a GMass user, give GMass a try<\/strong> \u2014 you\u2019ll have full access to all the features in this article, including the GMass API, during your free trial.<\/p>\n<p>You can\u00a0<a href=\"https:\/\/chrome.google.com\/webstore\/detail\/gmass-powerful-mail-merge\/ehomdgjhgmbidokdgicgmdiedadncbgf\"><strong>download the Chrome extension<\/strong><\/a><strong> and get started on your free trial<\/strong>\u00a0\u2014 no credit card required. Here\u2019s our\u00a0<a href=\"https:\/\/www.gmass.co\/quickstart-guide\">quickstart guide<\/a>\u00a0to get you up and running in minutes.<\/p>\n<p>And if you have any questions (or want to assign me more coding challenges),\u00a0<strong>join the<\/strong>\u00a0<a href=\"https:\/\/www.facebook.com\/groups\/662990762120154\"><strong>GMass Facebook group<\/strong><\/a>. We\u2019re building a great community of cold email and email marketing pros to share ideas, strategies, trends, and more and we\u2019d love to have you take part.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: Instant emails in recurring campaigns is now a native GMass feature. You no longer need to use this workaround. However, if you&#8217;d like to (for whatever reason),\u2026<\/p>\n","protected":false},"author":29,"featured_media":22165,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9152,4261],"tags":[],"class_list":["post-22121","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-google-sheets"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>How to Trigger a Transactional Email to New Rows in a Google Sheet<\/title>\r\n<meta name=\"description\" content=\"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to Trigger a Transactional Email to New Rows in a Google Sheet\" \/>\r\n<meta property=\"og:description\" content=\"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/\" \/>\r\n<meta property=\"og:site_name\" content=\"GMass Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GmailMailMerge\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2022-11-22T23:23:21+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2024-05-21T18:50:47+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\r\n\t<meta property=\"og:image:height\" content=\"933\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Sam Greenspan\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:site\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sam Greenspan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/\"},\"author\":{\"name\":\"Sam Greenspan\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/de82c1ac2f78713b569bb57bfb313c98\"},\"headline\":\"How to Trigger a Transactional Email to New Rows in a Google Sheet\",\"datePublished\":\"2022-11-22T23:23:21+00:00\",\"dateModified\":\"2024-05-21T18:50:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/\"},\"wordCount\":1491,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/Trigger-transactional-featured-tinified.png\",\"articleSection\":[\"API\",\"Google Sheets\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/\",\"name\":\"How to Trigger a Transactional Email to New Rows in a Google Sheet\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/Trigger-transactional-featured-tinified.png\",\"datePublished\":\"2022-11-22T23:23:21+00:00\",\"dateModified\":\"2024-05-21T18:50:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/de82c1ac2f78713b569bb57bfb313c98\"},\"description\":\"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/Trigger-transactional-featured-tinified.png\",\"contentUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/Trigger-transactional-featured-tinified.png\",\"width\":2000,\"height\":933},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/trigger-transactional-email-google-sheet\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Trigger a Transactional Email to New Rows in a Google Sheet\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\",\"name\":\"GMass Blog\",\"description\":\"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/de82c1ac2f78713b569bb57bfb313c98\",\"name\":\"Sam Greenspan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g\",\"caption\":\"Sam Greenspan\"},\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/author\\\/sam_greenspan\\\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Trigger a Transactional Email to New Rows in a Google Sheet","description":"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/","og_locale":"en_US","og_type":"article","og_title":"How to Trigger a Transactional Email to New Rows in a Google Sheet","og_description":"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.","og_url":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/","og_site_name":"GMass Blog","article_publisher":"https:\/\/www.facebook.com\/GmailMailMerge\/","article_published_time":"2022-11-22T23:23:21+00:00","article_modified_time":"2024-05-21T18:50:47+00:00","og_image":[{"width":2000,"height":933,"url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png","type":"image\/png"}],"author":"Sam Greenspan","twitter_card":"summary_large_image","twitter_creator":"@GMassForGmail","twitter_site":"@GMassForGmail","twitter_misc":{"Written by":"Sam Greenspan","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#article","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/"},"author":{"name":"Sam Greenspan","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/de82c1ac2f78713b569bb57bfb313c98"},"headline":"How to Trigger a Transactional Email to New Rows in a Google Sheet","datePublished":"2022-11-22T23:23:21+00:00","dateModified":"2024-05-21T18:50:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/"},"wordCount":1491,"commentCount":0,"image":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png","articleSection":["API","Google Sheets"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/","url":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/","name":"How to Trigger a Transactional Email to New Rows in a Google Sheet","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#primaryimage"},"image":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png","datePublished":"2022-11-22T23:23:21+00:00","dateModified":"2024-05-21T18:50:47+00:00","author":{"@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/de82c1ac2f78713b569bb57bfb313c98"},"description":"A Google Apps Script to send an instant, automated transactional email through GMass to the address in any new row you add to a Google Sheet.","breadcrumb":{"@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#primaryimage","url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png","contentUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2022\/11\/Trigger-transactional-featured-tinified.png","width":2000,"height":933},{"@type":"BreadcrumbList","@id":"https:\/\/www.gmass.co\/blog\/trigger-transactional-email-google-sheet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gmass.co\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Trigger a Transactional Email to New Rows in a Google Sheet"}]},{"@type":"WebSite","@id":"https:\/\/www.gmass.co\/blog\/#website","url":"https:\/\/www.gmass.co\/blog\/","name":"GMass Blog","description":"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gmass.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/de82c1ac2f78713b569bb57bfb313c98","name":"Sam Greenspan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/544dc4a3d6b96b537586cdde9d818feb8f0de187faed221fdb0dee3a356bf41a?s=96&d=mm&r=g","caption":"Sam Greenspan"},"url":"https:\/\/www.gmass.co\/blog\/author\/sam_greenspan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/22121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/comments?post=22121"}],"version-history":[{"count":10,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/22121\/revisions"}],"predecessor-version":[{"id":24216,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/22121\/revisions\/24216"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media\/22165"}],"wp:attachment":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media?parent=22121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/categories?post=22121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/tags?post=22121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}