Group recruitment e-mails: Mailmerge
How to write multiple emails at once to facilitate recruitment
We have used mailmerge in the past to send multiple emails to participants requiring individualized links for CDIs, in the Baby's New Words project. Here is how to set it up.
Mailmerge uses an R script, Excel document, Word documents and Outlook to compose and send multiple emails based on criteria that you want. For example, in Baby's New Words, we needed to send French and English CDI links every month to all study participants, and for certain participants we needed to include an extra blurb in the email to invite them to take part in an LEQ interview every 4 months.
The R Script
The R script should read in data from a study recruitment log (something that connects participant IDs with parent email addresses and their preferred contact language) and manipulate it in some way to produce a data frame with all variables needed for your mailmerge. This may also include merging with another data frame with WebCDI links (summary data can be downloaded from WebCDI after creating new links for participants and updating their Local Lab ID). For example, in Baby's New Words we created an Excel file with the following columns:
Baby ID
Study ID
CDI Link EN
CDI Link FR
Contact Language
Parent email
Parent first name
LEQ month
Have the R script save the resulting dataframe in a mailmerge folder that houses the other mailmerge docs.
The Excel File
The Excel file is how mailmerge knows who to send what. If anything is wrong in this file, the mailmerge will not work correctly. Different columns will map onto variables/placeholders in the Word doc, so that each row of data can plop into the email in the correct place.
The Word Doc
The word doc is basically your email template. Compose the email you would like to send to participants, and then the magic happens when you replace certain parts of the email with special code placeholders that will connect to the Excel spreadsheet. When sending out the mailmerge, make sure you select the format as "HTML text", rather than the default "Text".
Outlook
Outlook will send the emails. Your mailmerge will have to be connected to your Outlook on desktop. If you are using a Mac, make sure your default mail app is Outlook and if you have multiple accounts on your Outlook desktop, make the account that you would like to send the emails from your default account.
Last updated