Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Create a mail merge using Gmail and Google Sheets #65

Merged
merged 3 commits into from
Sep 17, 2019

Conversation

mhawksey
Copy link
Contributor

Solution submission for issue ticket #54 "Create and distribute visual rich mail merges from data in Google Sheets"

[If easier README can be commented on in the Google Doc]

Create and distribute visual rich mail merges with Gmail and Google Sheets
@mhawksey mhawksey changed the title Create a mail merge using Gmail and Google Sheets #54 Create a mail merge using Gmail and Google Sheets Sep 13, 2019
@asrivas asrivas requested a review from sqrrrl September 16, 2019 17:10
Copy link
Member

@sqrrrl sqrrrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just a few minor nits :)

@@ -0,0 +1,46 @@
---
title: Create a mail merge using Gmail and Google Sheets
description: Create and distribute visual rich mail merges with Gmail and Google Sheets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visual -> visually


1. Create a copy of the sample [Gmail/Sheets Mail Merge spreadsheet](https://docs.google.com/spreadsheets/d/1EfjLuYGab8Xt8wCn4IokBIG0_W4tBtiU4vxl3Y7FPsA/copy).

2. Update the ‘Recipients’ column with email addresses you would like to use in the mail merge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bold instead of quotes for Recipients.


5. A dialog box will appear and tell you that the script requires authorization. Read the authorization notice and continue.

6. When prompted enter or copy/paste the subject line used in your draft Gmail message and click ‘OK’
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bold instead of quotes for OK.


2. Update the ‘Recipients’ column with email addresses you would like to use in the mail merge

3. Create a draft message in your Gmail account using markers like {{First name}}, which correspond to column names, to indicate text you’d like to be replaced with data from the copied spreadsheet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest putting {{First name}} in code font (backticks)


6. When prompted enter or copy/paste the subject line used in your draft Gmail message and click ‘OK’

7. The ‘Email Sent’ column will update with the message status.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bold for 'Email Sent'


## Next steps

Additional columns can be added to the spreadsheet with other data you would like to use. Using the {{}} annotation and including your column name as part of your Gmail draft will allow you to include other data from your spreadsheet. If you change the name of the ‘Recipient’ or ‘Email Sent’ columns this will need to be updated by opening **Tools > Script Editor**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits:
{{}} in code font
Recipient & Email Sent in bold

@mhawksey
Copy link
Contributor Author

@sqrrrl thanks for the feedback. Hopefully I've picked up all those suggested edits now. Let me know if there is anything else

@sqrrrl
Copy link
Member

sqrrrl commented Sep 17, 2019

Looks great :)

@sqrrrl sqrrrl merged commit 37a4f9a into googleworkspace:master Sep 17, 2019
asrivas pushed a commit that referenced this pull request Jan 13, 2020
* Initial commit of Mail Merge solution

Create and distribute visual rich mail merges with Gmail and Google Sheets

* Minor edits to readme text

Edits based on comments in #65 (comment)

* update to head

* Updated to head

* Fix for null error when sending emails without variable tags

Fix for issue #98 on gsuitedevs branch #98
asrivas pushed a commit that referenced this pull request Apr 30, 2020
* Initial commit of Mail Merge solution

Create and distribute visual rich mail merges with Gmail and Google Sheets

* Minor edits to readme text

Edits based on comments in #65 (comment)

* update to head

* Updated to head

* Fix for null error when sending emails without variable tags

Fix for issue #98 on gsuitedevs branch #98

* Refactoring and V8 update

Includes ability for using formatted Google Sheets cell values for currencies, dates and more as well as detecting/ignoring filtered hidden rows. Code also updated to highlight Gmail `.sendMail()` options

* Updated mail merge solution moving Advanced Sheets Service and moving to V8

Removed dependency on Advanced Sheets Service
asrivas pushed a commit that referenced this pull request May 27, 2020
* Initial commit of Mail Merge solution

Create and distribute visual rich mail merges with Gmail and Google Sheets

* Minor edits to readme text

Edits based on comments in #65 (comment)

* update to head

* Updated to head

* Fix for null error when sending emails without variable tags

Fix for issue #98 on gsuitedevs branch #98

* Refactoring and V8 update

Includes ability for using formatted Google Sheets cell values for currencies, dates and more as well as detecting/ignoring filtered hidden rows. Code also updated to highlight Gmail `.sendMail()` options

* Updated mail merge solution moving Advanced Sheets Service and moving to V8

Removed dependency on Advanced Sheets Service

* Mail merge fix to escape cell data

Fix for #127 to escape cell data to make JSON safe

* Fixed EOF

https://github.com/gsuitedevs/solutions/pull/130/files/a8d745d949b33484dd6a33da4c0dfcfb1202cfdf#r431210317
sqrrrl pushed a commit that referenced this pull request Feb 17, 2021
… from the Gmail draft (#173)

* Initial commit of Mail Merge solution

Create and distribute visual rich mail merges with Gmail and Google Sheets

* Minor edits to readme text

Edits based on comments in #65 (comment)

* update to head

* Updated to head

* Fix for null error when sending emails without variable tags

Fix for issue #98 on gsuitedevs branch #98

* Refactoring and V8 update

Includes ability for using formatted Google Sheets cell values for currencies, dates and more as well as detecting/ignoring filtered hidden rows. Code also updated to highlight Gmail `.sendMail()` options

* Updated mail merge solution moving Advanced Sheets Service and moving to V8

Removed dependency on Advanced Sheets Service

* Mail merge fix to escape cell data

Fix for #127 to escape cell data to make JSON safe

* Fixed EOF

https://github.com/gsuitedevs/solutions/pull/130/files/a8d745d949b33484dd6a33da4c0dfcfb1202cfdf#r431210317

* Inline image handling for mail merge

Fix for the inline image issue #163

* Nit fix for mail merge #163

* Revert "Inline image handling for mail merge"

This reverts commit 363060c.

* Fix for mail merge inline image handling #163

Added handling of inline images inserted in the Gmail draft via image upload
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants