# Cognito Forms

> Work with your Cognito Forms: list forms and read their fields, create, read, update and delete entries, list a saved view's entries, upload and read files, generate entry documents, open or close a form on a schedule, and start a workflow for each new entry.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/cognito-forms

## Actions

### Create entry

Add an entry to a form from field values. The form's own notifications and rules apply as if someone had submitted it.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Field values (`entry`, object): The entry's fields, keyed by the form's JSON field names (see 'Get form schema'), such as {"Email": "jo@example.com"}. Leave empty for a form with no required fields.

**Outputs**

- `entry` (object): The entry, with the form's own fields named by their JSON names
- `entry_id` (text): The entry's id, to pass to the other entry steps
- `form` (text): The form the entry is in

**Example output**

```json
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}
```

### Delete entry

Permanently delete an entry. Needs a key with the Read/Write/Delete entry scope.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Entry (`entry_id`, text, required): The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `entry_id` (text): The entry deleted
- `form` (text): The form

**Example output**

```json
{
  "deleted": true,
  "entry_id": "12",
  "form": "1"
}
```

### Get entry

Get one entry of a form, with all its fields.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Entry (`entry_id`, text, required): The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.

**Outputs**

- `entry` (object): The entry, with the form's own fields named by their JSON names
- `entry_id` (text): The entry's id, to pass to the other entry steps
- `form` (text): The form the entry is in

**Example output**

```json
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}
```

### Get entry document

Generate a document (such as a PDF) from an entry with one of the form's document templates, and return its details and a short-lived link to it.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Entry (`entry_id`, text, required): The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.
- Template number (`template_number`, number, required): The template's ID, shown at the top right of its entry in the form's Manage Document Templates dialog (1 for the first). From 1 to 1000.
- Include the file's content (`include_content`, true/false): Also return the file itself as base64 text. Off by default, because files can be large; the short-lived link is always returned. Default: `false`.

**Outputs**

- `document` (object): The generated document
- `entry_id` (text): The entry
- `form` (text): The form
- `template_number` (number): The template used

**Example output**

```json
{
  "document": {
    "content_base64": "JVBERi0=",
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480,
    "url": "https://www.cognitoforms.com/d/EXAMPLE"
  },
  "entry_id": "12",
  "form": "1",
  "template_number": 1
}
```

### Get file

Get a file stored in Cognito Forms by its id, such as one an entry's file field holds or 'Upload file' returned: its name, type, size and a short-lived link.

**Inputs**

- File ID (`file_id`, text, required): The file's id, from an entry or an 'Upload file' step.
- Include the file's content (`include_content`, true/false): Also return the file itself as base64 text. Off by default, because files can be large; the short-lived link is always returned. Default: `false`.

**Outputs**

- `file` (object): The file
- `file_id` (text): The file's id

**Example output**

```json
{
  "file": {
    "content_base64": "JVBERi0=",
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480,
    "url": "https://www.cognitoforms.com/d/EXAMPLE"
  },
  "file_id": "f_01HXAMPLE"
}
```

### Get form schema

Get a form's schema (Swagger JSON): every field's JSON name and type. Use it to see which fields 'Create entry' and 'Update entry' take.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Only fields you can set (`input_only`, true/false): Leave out read-only fields such as the entry number. Default: `false`.
- Include file and document links (`include_links`, true/false): Include the link fields for uploaded files, signatures and entry documents. Default: `true`.

**Outputs**

- `form` (text): The form asked about
- `schema` (object): The form's Swagger schema, with its fields

**Example output**

```json
{
  "form": "1",
  "schema": {
    "definitions": {
      "ContactUs": {}
    },
    "swagger": "2.0"
  }
}
```

### List entries in a view

List the entries of a saved view from a form's Entries page, with the fields the view shows (repeating sections and tables are not included). Cognito Forms has no other way to list entries.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- View number (`view_id`, text, required): The number in the view's OData link, after 'Views(': on the form's Entries page open the view's menu, choose Sync View To > OData Consumer and Generate URL. Only grid views work.
- How many entries (`limit`, number): The most entries to return, 1 to 1000. Defaults to 100. From 1 to 1000.
- Only entry ids (`ids_only`, true/false): Return just each entry's id. Default: `false`.

**Outputs**

- `count` (number): How many are returned
- `entries` (list): The entries, as the view shows them
- `form` (text): The form
- `has_more` (true/false): True if the view holds more than were returned
- `total` (number): How many entries the view holds, if reported
- `view_id` (text): The view

**Example output**

```json
{
  "count": 1,
  "entries": [
    {
      "Email": "jo@example.com",
      "Id": "12"
    }
  ],
  "form": "1",
  "has_more": false,
  "total": 1,
  "view_id": "5"
}
```

### List forms

List the forms the API key can access, with their ids and names. Archived forms are not included.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "count": 1,
  "forms": [
    {
      "id": "1",
      "name": "Contact Us"
    }
  ]
}
```

### Set form availability

Set when a form accepts entries, and what visitors see outside that time. What you give replaces the form's current limit: leave Start, End and Message all empty to make the form available all of the time.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Available from (`start`, date and time): When the form opens. Empty for no start limit.
- Available until (`end`, date and time): When the form closes. Empty for no end limit.
- Message when unavailable (`message`, text): What visitors see outside the available time.

**Outputs**

- `availability_end` (text): When the form closes, empty if no limit
- `availability_start` (text): When the form opens, empty if no limit
- `form` (text): The form changed
- `not_available_message` (text): What visitors see outside that time

**Example output**

```json
{
  "availability_end": "2026-11-30T17:00:00Z",
  "availability_start": "2026-11-01T09:00:00Z",
  "form": "1",
  "not_available_message": "This form is closed."
}
```

### Update entry

Change fields of an entry. Fields you leave out keep their values. Cognito Forms refuses it for an entry that includes a paid order.

**Inputs**

- Form (`form`, text, required): The form. Pick one, or give its id or internal name from an earlier step.
- Entry (`entry_id`, text, required): The entry's number (such as 12) or entry id, from 'Create entry' or an earlier step.
- Field values (`entry`, object, required): The fields to change, keyed by the form's JSON field names (see 'Get form schema').

**Outputs**

- `entry` (object): The entry, with the form's own fields named by their JSON names
- `entry_id` (text): The entry's id, to pass to the other entry steps
- `form` (text): The form the entry is in

**Example output**

```json
{
  "entry": {
    "Email": "jo@example.com",
    "Entry": {
      "Action": "Submit",
      "Number": 12,
      "Status": "Submitted"
    },
    "Id": "12",
    "Name": {
      "First": "Jo",
      "Last": "Bloggs"
    }
  },
  "entry_id": "12",
  "form": "1"
}
```

### Upload file

Upload a file (up to 10 MB) to Cognito Forms so an entry's file field can use it. Cognito Forms has no way to delete it afterwards.

**Inputs**

- File name (`file_name`, text, required): The name to give the file, with its extension.
- File content (base64) (`content_base64`, text, required): The file's bytes, encoded as base64 text.
- File type (`content_type`, text): The file's media type, such as application/pdf.

**Outputs**

- `file` (object): The uploaded file
- `file_id` (text): The uploaded file's id

**Example output**

```json
{
  "file": {
    "content_type": "application/pdf",
    "id": "f_01HXAMPLE",
    "name": "agreement.pdf",
    "size": 20480
  },
  "file_id": "f_01HXAMPLE"
}
```
