Description Usage Arguments Details Value Author(s) References Examples
Create a new survey (and collector) from a survey template
1 2 3 4 5 |
template |
A Survey Monkey template ID number, possibly returned by |
survey |
A Survey Monkey survey ID number (or an object of class “sm_survey” from which it can be extracted), possibly returned by |
title |
A character string to use as the title of the survey. |
collector_name |
A character string to use as the name of the collector. If |
type |
Type of collector to create. Currently only allowed value is “email”. Weblink collectors can be created using |
recipients |
A list of a list for each recipient containing email addresses and potentially first names, last names, and a “Custom ID” for each recipient. Only email address is required. User can specify vectors between 1 and 4 items long. If lists do not have element names, items in each list are assumed to be email address, first name, last name, and custom ID (in that order). If supplied in a different order, each list element must be named: |
email_replyto |
A character string containing the reply-to email address for the survey. |
email_subject |
A character string containing the subject line for the email to be sent to recipients. |
email_body |
A character string containing the body of an email to be sent to recipients. The string should contain |
api_key |
Your API key. By default, retrieved from |
oauth_token |
Your OAuth 2.0 token, as generated by |
... |
Other arguments passed to |
Creates a new survey from a template or by copying an existing survey and generates an email collector for the specified survey. Survey Monkey BASIC users can only have three collectors per survey. Requesting more will result in a message with additional information about upgrading your account.
A list containing an object of class sm_collector
, an object of class sm_survey
, and additional details.
Thomas J. Leeper
https://developer.surveymonkey.com/mashery/create_flow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
smlogin()
# create survey by copying existing survey
s <- surveylist()
createsurvey(survey = s[[1]]$survey_id, title = 'Copied survey',
collector_name='Emails',
recipients = list(list('first@example.com'), list('second@example.com')),
email_replyto='me@example.com', email_subject='Please complete a short survey!')
# create survey from template
tmps <- templates()
createsurvey(template = tmps[[1]]$template_id, title = 'Copied survey',
collector_name='Emails',
recipients = list(list('first@example.com'), list('second@example.com')),
email_replyto='me@example.com', email_subject='Please complete a short survey!')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.