Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Contact Workers

leeper edited this page Oct 16, 2014 · 2 revisions

Contacting Workers

MTurkR provides one function to contact workers, but the function can be used in several different ways depending on your workflow. In any case, MTurk limits a requester to contacting workers who have completed an assignment for them in the past. This means that a requester cannot contact workers who have started but returned assignments, nor any other worker (this is to prevent spam).

The below describes how to contact workers using MTurkR in the R console. You can also contact workers without knowing any R code using interactive features of either the text-based wizard or the GUI.

Contacting one worker

The simplest way to use ContactWorkers is to contact a single worker. To do so, one simply needs to supply a WorkerId, email subject line, and email body message.

ContactWorkers(subjects = "Complete follow-up survey for $.50 bonus",
               msgs = "This is the body of an Email. 
                       The \n symbol separates lines. 
                       The \t symbol creates a tab. 
                       All emails are sent in plain text.",
               workers = "AnExampleWorkerId")

This produces an email that looks like the following:

Message from Thomas J. Leeper
---------------------------------
This is the body of an Email. The 
symbol separates lines. The      symbol creates a tab. All emails are sent in plain text.
---------------------------------

Greetings from Amazon Mechanical Turk,

The message above was sent by an Amazon Mechanical Turk user.
Please review the message and respond to it as you see fit.

Sincerely,
Amazon Mechanical Turk
https://workersandbox.mturk.com
410 Terry Avenue North
SEATTLE, WA 98109-5210 USA

It's always a good idea to send yourself a test email before distributing to make sure that it looks correct. Note: You can only send yourself an email if you have completed an assignment for yourself in the past. To circumvent this, you can create a HIT for yourself in the MTurk sandbox, complete the assignment and approve it, and then send the test email with the sandbox = TRUE argument in ContactWorkers.

Contacting multiple workers as a batch

If you want to contact a number of workers with an identical subject line and message, the best way is to use the "batch" mode of ContactWorkers (which is not the default). This dramatically reduces the number of API calls necessary to contact workers (thus reducing the amount of time needed to execute the operation) by a factor of about 100. The downside is that subject line and message cannot be customized for each worker.

To use this, the function call is exactly the same, except that you add a batch = TRUE argument after the other parameters.

Contacting multiple workers with individualized messages

If customized subject lines or messages are needed, then ContactWorkers can be used to send individualized messages to any number of workers. The function is vectorized, so one simply needs to supply a vector of WorkerIds, an equal length vector of subject lines, and an equal length vector of message bodies. Subject lines and message bodies can also be specified as single-element character vectors, which are internally duplicated for each worker. This quite literally repeats a single NotifyWorkers API call for each specified worker, making it much slower than using "batch" mode.