Setu Recipes: reusable workflows across every app.Browse templates

Integrations / SurveyMonkey

SurveyMonkey

Online surveys: list and create surveys, collectors and read responses.

9 actions OAuth 2 5 read3 write1 destructive Calls api.surveymonkey.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "surveymonkey" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
users_readIdentify the connected SurveyMonkey account
surveys_readRead your surveys and their questions
surveys_writeCreate, change and delete surveys
collectors_readRead the collectors (links) of your surveys
collectors_writeCreate collectors such as weblinks
responses_readSee which responses exist for a survey
responses_read_detailRead the answers in survey responses

Actions

Create weblink collectorwritesurveymonkey.create_collectorCreate a collector for a survey. The default type is a weblink; the response includes the survey link to share.

Needs scope: collectors_write

InputTypeDescription
survey_idstringRequiredSurvey ID
namestringRequiredCollector name
typestringRequiredCollector type
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.create_collector",
  input: {
    "survey_id": "<survey_id>",
    "name": "<name>",
    "type": "<type>"
  },
});
Create surveywritesurveymonkey.create_surveyCreate a survey with a title, or copy an existing survey or a template into a new survey. Add pages and questions afterwards in SurveyMonkey.

Needs scope: surveys_write

InputTypeDescription
titlestringRequiredSurvey title
from_survey_idstringOptionalCopy this existing survey
from_template_idstringOptionalCreate from this template
languagestringOptionalLanguage code, e.g. en
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.create_survey",
  input: {
    "title": "<title>"
  },
});
Delete surveydestructivesurveymonkey.delete_surveyDelete a survey and its responses. This cannot be undone through the API.

Needs scope: surveys_write

InputTypeDescription
survey_idstringRequiredSurvey ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.delete_survey",
  input: {
    "survey_id": "<survey_id>"
  },
  confirm: true,
});
Get surveyreadsurveymonkey.get_surveyGet a survey's title, language, page and question counts, response count and links.

Needs scope: surveys_read

InputTypeDescription
survey_idstringRequiredSurvey ID from list_surveys
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.get_survey",
  input: {
    "survey_id": "<survey_id>"
  },
});
Get survey with questionsreadsurveymonkey.get_survey_detailsGet a survey with all of its pages and questions (question and answer-choice IDs). Needed to interpret the answers returned by list_responses.

Needs scope: surveys_read

InputTypeDescription
survey_idstringRequiredSurvey ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.get_survey_details",
  input: {
    "survey_id": "<survey_id>"
  },
});
List collectorsreadsurveymonkey.list_collectorsList a survey's collectors (the weblinks, email campaigns and other ways it is distributed) with IDs and names.

Needs scope: collectors_read

InputTypeDescription
survey_idstringRequiredSurvey ID
pageintegerOptionalPage number, starting at 1
per_pageintegerOptionalCollectors per page
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.list_collectors",
  input: {
    "survey_id": "<survey_id>"
  },
});
List survey responsesreadsurveymonkey.list_responsesGet a survey's responses with their answers (question and choice IDs, plus text when simple is true). Needs a SurveyMonkey plan that allows response details; basic plans are limited to 25 responses.

Needs scope: responses_read_detail

InputTypeDescription
survey_idstringRequiredSurvey ID
pageintegerOptionalPage number, starting at 1
per_pageintegerOptionalResponses per page, up to 100 (default 50)
simplebooleanOptionalTrue to include question and answer text, not only IDs
statusstringOptionalOnly responses with this status
start_created_atstringOptionalOnly responses started after this time, e.g. 2021-06-01T00:00:00
end_created_atstringOptionalOnly responses started before this time
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.list_responses",
  input: {
    "survey_id": "<survey_id>"
  },
});
List surveysreadsurveymonkey.list_surveysList the surveys owned by or shared with the user, optionally searched by title, with IDs and titles. Returns one page.

Needs scope: surveys_read

InputTypeDescription
titlestringOptionalOnly surveys whose title contains this text
pageintegerOptionalPage number, starting at 1
per_pageintegerOptionalSurveys per page
sort_bystringOptionalSort field
sort_orderstringOptionalSort order
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.list_surveys",
  input: {},
});
Update surveywritesurveymonkey.update_surveyChange a survey's title, nickname or language. Only the fields you pass are changed.

Needs scope: surveys_write

InputTypeDescription
survey_idstringRequiredSurvey ID
titlestringOptionalNew title
nicknamestringOptionalNew nickname
languagestringOptionalLanguage code, e.g. en
TypeScript
await setu.execute({
  userId: "user_1",
  action: "surveymonkey.update_survey",
  input: {
    "survey_id": "<survey_id>"
  },
});