# LimeSurvey

> Run surveys in LimeSurvey from workflows: copy and activate a survey, add participants and send their invitations and reminders, export responses with answers by question code, add a response and read the response rate. Start a workflow when a response is completed or a participant is added.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/limesurvey

## Actions

### Activate survey

Start a survey taking responses. With Participants only, it gets a participant list first, so only people invited can answer. One already active is left as it is and said so.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Participants only (`participants_only`, true/false): Make a participant list, if it has none, so only people on it can answer, each with their own link. Off: anyone with the survey's link can. Default: `false`.
- Anonymous responses (`anonymized`, true/false): Keep responses apart from who gave them. Can't be changed once the survey is active. Leave blank for the survey's own setting.

**Outputs**

- `active` (true/false): True: the survey is active
- `already_active` (true/false): True when it was active before this step
- `link` (text): The link participants open the survey at
- `participant_list_created` (true/false): True when this step made its participant list
- `participants_only` (true/false): True when it has a participant list, so only people invited can answer
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "active": true,
  "already_active": false,
  "link": "https://surveys.example.com/index.php/175428",
  "participant_list_created": true,
  "participants_only": true,
  "survey_id": 175428
}
```

### Add participants

Add people to a survey's participant list, each with their own access code: one from the fields here, and any number more from a list, with attributes such as Department. Send their invitations with Invite participants.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Email (`email`, text): The participant's email address.
- First name (`first_name`, text): The participant's first name.
- Last name (`last_name`, text): The participant's last name.
- Attributes (`attributes`, object): The participant's extra attributes, by the names the survey gives them, such as Department.
- Language (`language`, text): The language code their emails and survey are in, such as de. Leave blank for the survey's base language.
- More participants (`participants`, list): More people to add, such as rows from a spreadsheet: a list of objects with email, first_name, last_name, language and attributes by name, such as [{"email": "ann@example.com", "first_name": "Ann", "Department": "Sales"}].

**Outputs**

- `added` (number): How many were added
- `failed` (number): How many LimeSurvey refused
- `participants` (list): Each participant given, with their new ID and access code, or why they weren't added
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "added": 1,
  "failed": 0,
  "participants": [
    {
      "attributes": {
        "Department": "Sales"
      },
      "completed": false,
      "completed_at": "",
      "email": "ann@example.com",
      "email_status": "OK",
      "error": "",
      "first_name": "Ann",
      "invited": false,
      "invited_at": "",
      "language": "en",
      "last_name": "Lee",
      "participant_id": 12,
      "reminded_at": "",
      "reminders_sent": 0,
      "token": "R5tm5aLZrzZAh9G",
      "uses_left": 1
    }
  ],
  "survey_id": 175428
}
```

### Add response

Save a response to an active survey, such as one taken on paper, by phone or in another app, with its answers keyed by question code. For a participant, give their access code: they're marked as completed.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Answers (`answers`, object, required): The answers by question code, such as satisfaction or foods[SQ001]; for a question with a list, the answer's code. List questions shows the codes.
- Access code (`token`, text): The access code (token) of the participant it's from. Leave blank for an anonymous response.
- Completed (`completed`, true/false): Save it as submitted. Off: as started and not completed. Default: `true`.
- Language (`language`, text): The language code it was answered in. Leave blank for the survey's base language.

**Outputs**

- `completed` (true/false): True when it was saved as submitted
- `note` (text): Anything that didn't work out after saving; empty when all did
- `participant_marked_completed` (true/false): True when the participant was marked as having completed the survey
- `response_id` (number): The new response's ID
- `survey_id` (number): The survey's ID
- `token` (text): The participant's access code it was saved for; empty for none

**Example output**

```json
{
  "completed": true,
  "note": "",
  "participant_marked_completed": true,
  "response_id": 8,
  "survey_id": 175428,
  "token": "R5tm5aLZrzZAh9G"
}
```

### Copy survey

Copy a survey with its questions and settings under a new title, such as for this month's round. The copy isn't active and has no responses or participants.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- New title (`title`, text, required): The new survey's title, such as Customer feedback - December.

**Outputs**

- `copied_from` (number): The ID of the survey copied
- `link` (text): The link participants will open the new survey at, once active
- `survey_id` (number): The new survey's ID
- `title` (text): The new survey's title

**Example output**

```json
{
  "copied_from": 175428,
  "link": "https://surveys.example.com/index.php/391846",
  "survey_id": 391846,
  "title": "Customer feedback - December"
}
```

### Delete survey

Delete a survey with all its responses and participants. This can't be undone. One that isn't there is left alone and said so.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.

**Outputs**

- `deleted` (true/false): True when the survey was deleted
- `found` (true/false): False when there was no such survey
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "deleted": true,
  "found": true,
  "survey_id": 391846
}
```

### Expire survey

Stop a survey taking responses, now or at a date and time, by setting its expiry date as LimeSurvey's Expire button does. Its responses stay.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- End at (`end_at`, text): When it stops taking responses, in LimeSurvey's own time as its survey settings show it, such as 2026-12-31 17:00. Leave blank to end it now.

**Outputs**

- `active` (true/false): True while the survey is still active (it stays active, expired)
- `ended_now` (true/false): True when it was ended now rather than at a date given
- `expires` (text): When the survey stops taking responses, as LimeSurvey shows it (YYYY-MM-DD HH:MM:SS, in its own time zone)
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "active": true,
  "ended_now": true,
  "expires": "2026-11-10 17:00:00",
  "survey_id": 175428
}
```

### Export responses

Get a survey's responses, oldest first, each with its answers keyed by question code, as rows for a spreadsheet, a report or another app: all, only completed ones or only those not completed, from a response ID on.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Completed or not (`completion`, text): Only completed responses, only those not completed, or all. One of: `all`, `complete` (Completed), `incomplete` (Not completed). Default: `all`.
- Answers as (`answers_as`, text): The answers' codes (such as A1), as LimeSurvey stores them, or their text (such as Very satisfied). One of: `codes` (Answer codes (such as A1)), `text` (Answer text (such as Very satisfied)). Default: `codes`.
- From response ID (`from_response_id`, number): Only responses with this ID or later, such as the next one after the last you exported. At least 1.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.
- Language (`language`, text): For a survey in several languages, the language code to read it in, such as de. Leave blank for its base language.

**Outputs**

- `answer_codes` (list): The answer codes, in the survey's order: a header row
- `count` (number): How many responses are listed
- `more` (true/false): True when there are more after these
- `next_from_response_id` (number): The From response ID that lists the next ones; 0 when there are no more
- `responses` (list): The responses, oldest first
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "answer_codes": [
    "satisfaction",
    "comments"
  ],
  "count": 1,
  "more": false,
  "next_from_response_id": 0,
  "responses": [
    {
      "answers": {
        "comments": "Quick and friendly.",
        "satisfaction": "A1"
      },
      "completed": true,
      "language": "en",
      "last_action_at": "2026-11-10 14:31:08",
      "last_page": 2,
      "response_id": 7,
      "started_at": "2026-11-10 14:28:51",
      "submitted_at": "2026-11-10 14:31:08",
      "token": "R5tm5aLZrzZAh9G"
    }
  ],
  "survey_id": 175428
}
```

### Get response

Get one response with its answers keyed by question code: by its ID, or by the access code of the participant who gave it. One that isn't there comes back with found false.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Response ID (`response_id`, number): The response's ID. Give this or an access code. At least 1.
- Access code (`token`, text): The participant's access code (token), for their newest response.
- Answers as (`answers_as`, text): The answers' codes (such as A1), as LimeSurvey stores them, or their text (such as Very satisfied). One of: `codes` (Answer codes (such as A1)), `text` (Answer text (such as Very satisfied)). Default: `codes`.
- Language (`language`, text): For a survey in several languages, the language code to read it in, such as de. Leave blank for its base language.

**Outputs**

- `count` (number): How many responses match (a participant may give several)
- `found` (true/false): False when no response matches
- `response` (object): The response; for an access code, its newest
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "count": 1,
  "found": true,
  "response": {
    "answers": {
      "comments": "Quick and friendly.",
      "satisfaction": "A1"
    },
    "completed": true,
    "language": "en",
    "last_action_at": "2026-11-10 14:31:08",
    "last_page": 2,
    "response_id": 7,
    "started_at": "2026-11-10 14:28:51",
    "submitted_at": "2026-11-10 14:31:08",
    "token": "R5tm5aLZrzZAh9G"
  },
  "survey_id": 175428
}
```

### Get response summary

Get a survey's numbers: responses completed and not, participants invited, completed and opted out, and the response rate. For a daily report or a check on how a survey is going.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.

**Outputs**

- `completed_participants` (number): Participants who completed it
- `completed_responses` (number): Responses completed
- `has_participant_list` (true/false): True when the survey has a participant list
- `incomplete_responses` (number): Responses started and not completed
- `invalid_emails` (number): Participants with an email address that isn't valid
- `invited` (number): Participants sent an invitation
- `opted_out` (number): Participants who opted out of its emails
- `participants` (number): People on its participant list
- `response_rate` (number): Participants who completed it, in percent of all
- `screened_out` (number): Participants screened out
- `survey_id` (number): The survey's ID
- `total_responses` (number): Every response

**Example output**

```json
{
  "completed_participants": 40,
  "completed_responses": 42,
  "has_participant_list": true,
  "incomplete_responses": 5,
  "invalid_emails": 2,
  "invited": 58,
  "opted_out": 1,
  "participants": 60,
  "response_rate": 66.7,
  "screened_out": 0,
  "survey_id": 175428,
  "total_responses": 47
}
```

### Get survey

Get a survey's title, description, welcome and end texts, languages, dates, link, and how many responses and participants it has.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.

**Outputs**

- `active` (true/false): True while the survey is active (taking responses)
- `admin_email` (text): The survey administrator's email address
- `anonymized` (true/false): True when responses aren't linked to participants
- `completed_responses` (number): Responses completed
- `created` (text): When the survey was made, as LimeSurvey shows it (YYYY-MM-DD HH:MM:SS, in its own time zone)
- `description` (text): The survey's description, as plain text
- `end_text` (text): The end message, as plain text
- `expires` (text): When the survey stops taking responses, as LimeSurvey shows it (YYYY-MM-DD HH:MM:SS, in its own time zone); empty for never
- `has_participant_list` (true/false): True when the survey has a participant list
- `incomplete_responses` (number): Responses started and not completed
- `language` (text): The survey's base language code, such as en
- `languages` (list): Every language the survey is in, the base one first
- `link` (text): The link participants open the survey at
- `participant_attributes` (list): The names of its participants' extra attributes
- `participants` (number): People on its participant list
- `start_date` (text): When the survey starts taking responses, as LimeSurvey shows it (YYYY-MM-DD HH:MM:SS, in its own time zone); empty for none
- `survey_id` (number): The survey's ID
- `title` (text): The survey's title
- `welcome_text` (text): The welcome message, as plain text

**Example output**

```json
{
  "active": true,
  "admin_email": "surveys@example.com",
  "anonymized": false,
  "completed_responses": 42,
  "created": "2026-11-02 09:14:00",
  "description": "Tell us how we did.",
  "end_text": "Thanks for your answers!",
  "expires": "",
  "has_participant_list": true,
  "incomplete_responses": 5,
  "language": "en",
  "languages": [
    "en"
  ],
  "link": "https://surveys.example.com/index.php/175428",
  "participant_attributes": [
    "Department"
  ],
  "participants": 60,
  "start_date": "",
  "survey_id": 175428,
  "title": "Customer feedback",
  "welcome_text": "Thank you for taking a few minutes."
}
```

### Invite participants

Email the survey's invitation, with each person's own link, to participants not invited yet, or only those named. LimeSurvey sends a batch at a time (50 unless changed) and says how many are left.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Participant IDs (`participant_ids`, text): Only these participants, by their IDs (from List participants or Add participants), separated by commas. Leave blank for everyone due one.

**Outputs**

- `failed` (number): How many couldn't be sent
- `left_to_send` (number): How many more are due, past LimeSurvey's batch size; run the step again to send them
- `participants` (list): Each participant emailed
- `sent` (number): How many emails were sent
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "failed": 0,
  "left_to_send": 0,
  "participants": [
    {
      "email": "ann@example.com",
      "error": "",
      "name": "Ann Lee",
      "participant_id": 12,
      "status": "OK"
    }
  ],
  "sent": 1,
  "survey_id": 175428
}
```

### List participants

List a survey's participants, oldest first, with whether each was invited and reminded and completed it, and their attributes: all, only those who completed it or only those who haven't, or one email.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Completed or not (`status`, text): Only participants who completed the survey, or only those who haven't. One of: `any`, `completed`, `not_completed` (Not completed). Default: `any`.
- Email (`email`, text): Only the participant with this email address.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.

**Outputs**

- `completed` (number): Of those, how many completed the survey
- `count` (number): How many participants are listed
- `participants` (list): The participants, oldest first
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "completed": 0,
  "count": 1,
  "participants": [
    {
      "attributes": {
        "Department": "Sales"
      },
      "completed": false,
      "completed_at": "",
      "email": "ann@example.com",
      "email_status": "OK",
      "first_name": "Ann",
      "invited": true,
      "invited_at": "2026-11-09 10:02",
      "language": "en",
      "last_name": "Lee",
      "participant_id": 12,
      "reminded_at": "",
      "reminders_sent": 0,
      "token": "R5tm5aLZrzZAh9G",
      "uses_left": 1
    }
  ],
  "survey_id": 175428
}
```

### List questions

List a survey's questions in order, with each one's code, text, type, subquestions and answer options, and the code of every answer a response has: the keys Add response takes and Export responses gives.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Language (`language`, text): For a survey in several languages, the language code to read it in, such as de. Leave blank for its base language.

**Outputs**

- `answer_codes` (list): The code of every answer a response has, such as satisfaction and foods[SQ001]: the keys of a response's answers
- `count` (number): How many questions it has
- `questions` (list): The questions, in the order the survey asks them
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "answer_codes": [
    "satisfaction",
    "comments"
  ],
  "count": 2,
  "questions": [
    {
      "answer_options": [
        {
          "code": "A1",
          "scale": "1",
          "text": "Very satisfied"
        },
        {
          "code": "A2",
          "scale": "1",
          "text": "Not satisfied"
        }
      ],
      "code": "satisfaction",
      "group": "About your visit",
      "mandatory": true,
      "question": "How satisfied are you?",
      "question_id": 871,
      "subquestions": [],
      "type": "L",
      "type_name": "List (radio)"
    },
    {
      "answer_options": [],
      "code": "comments",
      "group": "About your visit",
      "mandatory": false,
      "question": "Anything else?",
      "question_id": 872,
      "subquestions": [],
      "type": "T",
      "type_name": "Long free text"
    }
  ],
  "survey_id": 175428
}
```

### List surveys

List the surveys the connected user can see, with whether each is active, when it ends and its link: all, only active or not active, or by words in the title.

**Inputs**

- Active or not (`status`, text): Only active surveys, only ones not active, or both. One of: `any`, `active`, `inactive` (Not active). Default: `any`.
- Title contains (`search`, text): Only surveys with these words in the title.

**Outputs**

- `count` (number): How many surveys are listed
- `surveys` (list): The surveys, by ID

**Example output**

```json
{
  "count": 1,
  "surveys": [
    {
      "active": true,
      "expires": "",
      "link": "https://surveys.example.com/index.php/175428",
      "start_date": "",
      "survey_id": 175428,
      "title": "Customer feedback"
    }
  ]
}
```

### Remind participants

Email a reminder to participants who were invited and haven't completed the survey: all of them, or only those named, waited on long enough, or not reminded too often already.

**Inputs**

- Survey (`survey_id`, text, required): The survey: pick it, or give its ID, the number LimeSurvey shows beside its title.
- Participant IDs (`participant_ids`, text): Only these participants, by their IDs (from List participants or Add participants), separated by commas. Leave blank for everyone due one.
- Days since last email (`min_days_between`, number): Only participants last emailed at least this many days ago. From 0 to 365.
- Most reminders (`max_reminders`, number): Only participants sent fewer reminders than this. From 1 to 100.

**Outputs**

- `failed` (number): How many couldn't be sent
- `left_to_send` (number): How many more are due, past LimeSurvey's batch size; run the step again to send them
- `participants` (list): Each participant emailed
- `sent` (number): How many emails were sent
- `survey_id` (number): The survey's ID

**Example output**

```json
{
  "failed": 0,
  "left_to_send": 0,
  "participants": [
    {
      "email": "ann@example.com",
      "error": "",
      "name": "Ann Lee",
      "participant_id": 12,
      "status": "OK"
    }
  ],
  "sent": 1,
  "survey_id": 175428
}
```
