# Formsite

> Start a workflow when someone submits a Formsite form. List your forms and their questions, read and search a form's results with every answer, and manage the webhooks that post completed results to an address of your own.

App · 8 actions. Web page: https://docs.lodol.com/docs/integrations/formsite

## Actions

### Create webhook

Have a form post each completed result to a web address. If the form already posts to that address, its handshake key is updated instead.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.
- Address (`url`, text, required): The web address Formsite posts to, starting with https://.
- Handshake key (`handshake_key`, text): A secret text Formsite adds to every post, so your receiver can tell the post is genuine.

**Outputs**

- `webhook` (object): The webhook

**Example output**

```json
{
  "webhook": {
    "event": "result_completed",
    "handshake_key": "TEST_KEY",
    "url": "https://example.com/hook"
  }
}
```

### Delete webhook

Stop a form posting to a web address.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.
- Address (`url`, text, required): The web address Formsite posts to, starting with https://.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `url` (text): The address that was removed

**Example output**

```json
{
  "deleted": true,
  "url": "https://example.com/hook"
}
```

### Get form

Get one form: its name, link, state and result count.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.

**Outputs**

- `form` (object): The form

**Example output**

```json
{
  "form": {
    "description": "Questions from our website visitors",
    "directory": "form1",
    "embed_code": "<iframe></iframe>",
    "files_size": 0,
    "is_open": true,
    "link": "https://fs4.formsite.com/abc123/form1/index",
    "name": "Contact us",
    "publish": {
      "embed_code": "<iframe></iframe>",
      "link": "https://fs4.formsite.com/abc123/form1/index"
    },
    "results_count": 12,
    "state": "open",
    "state_text": "open",
    "stats": {
      "filesSize": 0,
      "resultsCount": 12
    }
  }
}
```

### Get form result

Get one result of a form by its id, with every answer, also keyed by question id in 'answers'.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.
- Result ID (`result_id`, text, required): The result's number, from 'List form results'.

**Outputs**

- `result` (object): The result

**Example output**

```json
{
  "result": {
    "answers": {
      "3": "Jo Bloggs",
      "4": [
        "Sales"
      ]
    },
    "date_finish": "2026-10-19T09:02:10Z",
    "date_start": "2026-10-19T09:00:00Z",
    "date_update": "2026-10-19T09:02:10Z",
    "id": "1204",
    "is_finished": true,
    "items": [
      {
        "id": "3",
        "position": 1,
        "value": "Jo Bloggs"
      },
      {
        "id": "4",
        "position": 2,
        "values": [
          {
            "position": 2,
            "value": "Sales"
          }
        ]
      }
    ],
    "login_email": "",
    "login_username": "",
    "payment_amount": "",
    "payment_status": "",
    "result_id": "1204",
    "result_status": "Complete",
    "user_browser": "Chrome 118",
    "user_device": "Desktop",
    "user_ip": "203.0.113.7",
    "user_referrer": "N/A"
  }
}
```

### List form items

List the questions of a form that store answers, each with its id (which keys a result's answers) and label. Headings and images are left out.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.
- Results labels ID (`results_labels`, text): Label the questions with a results label set instead of their question text. Its id is on the 'Formsite API' page of the form's settings.

**Outputs**

- `count` (number): How many questions
- `items` (list): The questions

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "children": [],
      "id": "3",
      "label": "Your name",
      "position": 1
    }
  ]
}
```

### List form results

List a form's results (the answers people submitted), newest first, optionally within dates or ids, sorted, or matching a search on one question. Returns one page; ask for 'page' + 1 while 'has_more' is true.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.
- After date (`after_date`, date and time): Only results submitted after this date and time.
- Before date (`before_date`, date and time): Only results submitted before this date and time.
- After result ID (`after_id`, number): Only results with a higher id than this one. Use the last id you handled to read only what is new. At least 0.
- Before result ID (`before_id`, number): Only results with a lower id than this one. At least 0.
- Search in (`search_item`, text): The question (or result field) to search. Give it together with 'Search for'.
- Search type (`search_operator`, text): How the question must match. Choice questions and result fields only match 'Is exactly'. Defaults to 'Is exactly'. One of: `equals` (Is exactly), `contains`, `begins` (Begins with), `ends` (Ends with).
- Search for (`search_value`, text): The text to look for. For a choice question, give the number of the choice's position (1 for the first choice).
- Sort by (`sort_by`, text): The question (or result field) to sort on. Defaults to the result ID.
- Order (`sort_direction`, text): Newest first by default. One of: `desc` (Newest first (default)), `asc` (Oldest first).
- Results view ID (`results_view`, text): Only the columns of one results view. Its id is on the 'Formsite API' page of the form's settings. Defaults to all data.
- Page size (`limit`, number): How many results to return, 1 to 500. Defaults to 100. From 1 to 500.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether a later page exists; ask for 'page' + 1
- `last_page` (number): The number of the last page
- `page` (number): This page's number
- `results` (list): The results

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "last_page": 1,
  "page": 1,
  "results": [
    {
      "answers": {
        "3": "Jo Bloggs",
        "4": [
          "Sales"
        ]
      },
      "date_finish": "2026-10-19T09:02:10Z",
      "date_start": "2026-10-19T09:00:00Z",
      "date_update": "2026-10-19T09:02:10Z",
      "id": "1204",
      "is_finished": true,
      "items": [
        {
          "id": "3",
          "position": 1,
          "value": "Jo Bloggs"
        },
        {
          "id": "4",
          "position": 2,
          "values": [
            {
              "position": 2,
              "value": "Sales"
            }
          ]
        }
      ],
      "login_email": "",
      "login_username": "",
      "payment_amount": "",
      "payment_status": "",
      "result_id": "1204",
      "result_status": "Complete",
      "user_browser": "Chrome 118",
      "user_device": "Desktop",
      "user_ip": "203.0.113.7",
      "user_referrer": "N/A"
    }
  ]
}
```

### List forms

List every form in the account with its directory, link, whether it is open and how many results it holds.

**Inputs**: None.

**Outputs**

- `count` (number): How many forms
- `forms` (list): The forms

**Example output**

```json
{
  "count": 1,
  "forms": [
    {
      "description": "Questions from our website visitors",
      "directory": "form1",
      "embed_code": "<iframe></iframe>",
      "files_size": 0,
      "is_open": true,
      "link": "https://fs4.formsite.com/abc123/form1/index",
      "name": "Contact us",
      "publish": {
        "embed_code": "<iframe></iframe>",
        "link": "https://fs4.formsite.com/abc123/form1/index"
      },
      "results_count": 12,
      "state": "open",
      "state_text": "open",
      "stats": {
        "filesSize": 0,
        "resultsCount": 12
      }
    }
  ]
}
```

### List webhooks

List the web addresses a form posts completed results to.

**Inputs**

- Form (`form_dir`, text, required): The form. Pick one, or give its directory from an earlier step.

**Outputs**

- `count` (number): How many webhooks
- `webhooks` (list): The form's webhooks

**Example output**

```json
{
  "count": 1,
  "webhooks": [
    {
      "event": "result_completed",
      "handshake_key": "TEST_KEY",
      "url": "https://example.com/hook"
    }
  ]
}
```
