# M-Files

> Save, find and file documents in M-Files with their properties, move them through workflow states, check them out and in, and download their files.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/m-files

## Actions

### Add comment

Add a comment to an object, shown in its comments in M-Files.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- Comment (`comment`, text, required): The comment.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Add file

Add a file to a document or other object, such as an attachment. A one-file document becomes a multi-file one.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- File (`file`, text, required): The file: upload one, pick a file from an earlier step, or paste a public https link to one.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Change workflow state

Move an object to a workflow state, such as Approved, with a comment. M-Files runs the state's own actions.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- Workflow (`m_files_workflow_id`, text, required): The M-Files workflow. Pick one, or give its id from an earlier step.
- State (`state_id`, text, required): The workflow state, such as Approved. Pick one, or give its id.
- Comment (`comment`, text): A comment saved with the change, such as why.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Check in

Check in an object the connection's user has checked out, saving its changes as a new version.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Check out

Check an object out to the connection's user, so nobody else changes it until it's checked in.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": true,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": true,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Create document

Save a file in M-Files as a new document of a class, with its title and properties.

**Inputs**

- Class (`class_id`, text, required): The document's class, such as Minutes. Pick one, or give its id.
- File (`file`, text, required): The file: upload one, pick a file from an earlier step, or paste a public https link to one.
- Name or title (`title`, text): The object's name, such as Council minutes 2026-11-02.
- Properties (`properties`, object): Values for the new document, one per property of the class. Dates use the date picker; a value-list property takes one of its values.

**Outputs**

- `object` (object): The new object
- `object_id` (number): The new object's id
- `object_type` (number): Its object type

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  },
  "object_id": 659,
  "object_type": 0
}
```

### Create object

Create an object without a file, such as a project, a contact or a document record, with its properties.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Class (`class_id`, text, required): The object's class. Pick one, or give its id.
- Name or title (`title`, text): The object's name, such as Council minutes 2026-11-02.
- Properties (`properties`, object): Values for the new object, one per property of the class.

**Outputs**

- `object` (object): The new object
- `object_id` (number): The new object's id
- `object_type` (number): Its object type

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  },
  "object_id": 659,
  "object_type": 0
}
```

### Delete object

Mark an object deleted. It disappears from searches and views; 'Undelete object' brings it back.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `deleted` (true/false): True when the object is now marked deleted
- `object_id` (number): The object's id
- `object_type` (number): Its object type
- `title` (text): Its title

**Example output**

```json
{
  "deleted": true,
  "object_id": 659,
  "object_type": 0,
  "title": "Council minutes 2026-11-02"
}
```

### Download file

Download a document's file, as stored or as a PDF, for a later step to attach or send.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- File ID (`file_id`, text): Which of the object's files ('id' in its 'files'). Leave empty for the first.
- Format (`file_format`, text): As stored (the default), or converted to PDF by M-Files. One of: `native` (As stored (default)), `pdf`.

**Outputs**

- `content_type` (text): The file's type, such as application/pdf
- `document_ref` (text): The downloaded file, for later steps
- `file_id` (number): The file downloaded
- `filename` (text): The file's name
- `object_id` (number): The object downloaded from
- `object_type` (number): The object's type
- `size_bytes` (number): The file's size in bytes
- `url` (text): Where to open the downloaded file

**Example output**

```json
{
  "content_type": "application/pdf",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "file_id": 412,
  "filename": "Council minutes 2026-11-02.pdf",
  "object_id": 659,
  "object_type": 0,
  "size_bytes": 48213,
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
}
```

### Get class

Get a class with its properties: each one's name, type and whether it's required.

**Inputs**

- Class (`class_id`, text, required): The class. Pick one, or give its id from an earlier step.

**Outputs**

- `class` (object): The class
- `properties` (list): Its properties
- `property_count` (number): How many properties

**Example output**

```json
{
  "class": {
    "id": 5,
    "name": "Minutes",
    "name_property_id": 0,
    "object_type": 0,
    "workflow_id": 0
  },
  "properties": [
    {
      "data_type": "Text",
      "id": 0,
      "is_automatic": false,
      "is_name": true,
      "name": "Name or title",
      "required": true,
      "value_list_id": null
    },
    {
      "data_type": "Date",
      "id": 1021,
      "is_automatic": false,
      "is_name": false,
      "name": "Meeting date",
      "required": false,
      "value_list_id": null
    }
  ],
  "property_count": 2
}
```

### Get object

Get a document or other object with its properties, files and check-out status.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Get vault

Get the M-Files vault the connection signs in to, and the user's id in it.

**Inputs**: None.

**Outputs**

- `address` (text): The M-Files address signed in to
- `user_id` (number): The connection's user id in the vault
- `vault` (object): The vault

**Example output**

```json
{
  "address": "https://cityofexample.cloudvault.m-files.com",
  "user_id": 12,
  "vault": {
    "guid": "{C840BE1A-5B47-4AC0-8EF7-835C166C8E24}",
    "name": "City Records"
  }
}
```

### Get version history

List an object's versions, newest first, with when each was made.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `count` (number): How many versions
- `object_id` (number): The object
- `object_type` (number): The object type
- `versions` (list): Its versions, newest first

**Example output**

```json
{
  "count": 2,
  "object_id": 659,
  "object_type": 0,
  "versions": [
    {
      "class_id": 5,
      "file_count": 1,
      "modified_at": "2026-11-02T14:06:00Z",
      "title": "Council minutes 2026-11-02",
      "version": 2
    },
    {
      "class_id": 5,
      "file_count": 1,
      "modified_at": "2026-11-02T14:05:00Z",
      "title": "Council minutes draft",
      "version": 1
    }
  ]
}
```

### List classes

List the classes of an object type, such as Contract or Minutes, or of every type.

**Inputs**

- Object type (`object_type`, text): Only classes of this object type. Leave empty for every class.

**Outputs**

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

**Example output**

```json
{
  "classes": [
    {
      "id": 5,
      "name": "Minutes",
      "name_property_id": 0,
      "object_type": 0,
      "workflow_id": 0
    }
  ],
  "count": 1
}
```

### List object types

List the vault's object types, such as Document, Project or Customer, with their ids.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `object_types` (list): The object types

**Example output**

```json
{
  "count": 1,
  "object_types": [
    {
      "allow_adding": true,
      "can_have_files": true,
      "external": false,
      "id": 0,
      "is_object_type": true,
      "name": "Document",
      "name_plural": "Documents"
    }
  ]
}
```

### List value lists

List the vault's value lists, such as Departments or Countries, with their ids.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `value_lists` (list): The value lists

**Example output**

```json
{
  "count": 1,
  "value_lists": [
    {
      "allow_adding": true,
      "can_have_files": false,
      "external": false,
      "id": 101,
      "is_object_type": false,
      "name": "Department",
      "name_plural": "Departments"
    }
  ]
}
```

### List values

List the values of a value list, such as each department, optionally only those matching a name.

**Inputs**

- Value list (`value_list_id`, text, required): The value list. Pick one, or give its id.
- Name (`name_filter`, text): Only values whose name matches. Use * as a wildcard, such as Plan*.
- How many (`count`, number): The most to return, 1 to 500. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when M-Files has more
- `items` (list): The values

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "display_id": "3",
      "id": 3,
      "name": "Planning",
      "owner_id": null,
      "parent_id": null
    }
  ]
}
```

### List view contents

List what's in a view, as M-Files shows it: its views, folders and objects. Leave the view empty for the vault's home.

**Inputs**

- View (`view`, text): The view. Pick one, or give a 'path' from an earlier step to open a view or folder inside it. Empty is the home.

**Outputs**

- `folders` (list): The folders in it
- `has_more` (true/false): True when M-Files left some out
- `object_count` (number): How many objects
- `objects` (list): The objects in it
- `path` (text): The view's path, empty for the home
- `views` (list): The views in it

**Example output**

```json
{
  "folders": [
    {
      "name": "Planning",
      "path": "V101/L3"
    }
  ],
  "has_more": false,
  "object_count": 1,
  "objects": [
    {
      "checked_out_to": "",
      "checked_out_to_me": false,
      "class_id": 5,
      "class_name": "Minutes",
      "created_at": "2026-11-02T14:05:00Z",
      "display_id": "659",
      "files": [
        {
          "changed_at": "2026-11-02T14:05:00Z",
          "extension": "pdf",
          "file_name": "Council minutes 2026-11-02.pdf",
          "id": 412,
          "name": "Council minutes 2026-11-02",
          "size": 48213,
          "version": 1
        }
      ],
      "id": 659,
      "is_checked_out": false,
      "is_deleted": false,
      "modified_at": "2026-11-02T14:06:00Z",
      "object_type": 0,
      "properties": {
        "Meeting date": "2026-11-02",
        "Name or title": "Council minutes 2026-11-02"
      },
      "property_list": [
        {
          "data_type": "Text",
          "display_value": "Council minutes 2026-11-02",
          "id": 0,
          "lookup_ids": [],
          "name": "Name or title",
          "value": "Council minutes 2026-11-02"
        },
        {
          "data_type": "Lookup",
          "display_value": "Minutes",
          "id": 100,
          "lookup_ids": [
            5
          ],
          "name": "Class",
          "value": "Minutes"
        },
        {
          "data_type": "Date",
          "display_value": "11/2/2026",
          "id": 1021,
          "lookup_ids": [],
          "name": "Meeting date",
          "value": "2026-11-02"
        }
      ],
      "single_file": true,
      "title": "Council minutes 2026-11-02",
      "version": 2
    }
  ],
  "path": "V101",
  "views": [
    {
      "id": 102,
      "name": "By meeting",
      "path": "V101/V102"
    }
  ]
}
```

### List workflow states

List a workflow's states, such as Draft, Waiting for approval and Approved.

**Inputs**

- Workflow (`m_files_workflow_id`, text, required): The M-Files workflow. Pick one, or give its id from an earlier step.

**Outputs**

- `count` (number): How many
- `m_files_workflow_id` (number): The workflow
- `states` (list): The states

**Example output**

```json
{
  "count": 2,
  "m_files_workflow_id": 101,
  "states": [
    {
      "id": 101,
      "name": "Draft",
      "selectable": true
    },
    {
      "id": 102,
      "name": "Approved",
      "selectable": true
    }
  ]
}
```

### List workflows

List the vault's workflows, such as Contract approval, with their ids.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "count": 1,
  "workflows": [
    {
      "class_id": -1,
      "id": 101,
      "name": "Document approval"
    }
  ]
}
```

### Replace file

Save a new version of a document with a new file in place of one of its files.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- File (`file`, text, required): The file: upload one, pick a file from an earlier step, or paste a public https link to one.
- File ID (`file_id`, text): Which of its files to replace ('id' in its 'files'). Needed only when it has several.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Search objects

Find documents and other objects by their words, title, class, property values, workflow state or dates, with their properties. Returns up to 500.

**Inputs**

- Object type (`object_type`, text): Only objects of this type, such as Document.
- Class (`class_id`, text): Only objects of this class.
- Words (`text`, text): Words to find in the objects' properties and file contents, as M-Files' search box does.
- Title contains (`title`, text): Only objects whose name or title contains this.
- Property values (`conditions`, object): Values to match, one per property of the class. Text may use * as a wildcard, such as Smith*.
- Workflow (`m_files_workflow_id`, text): Only objects in this workflow.
- State (`state_id`, text): Only objects in this workflow state.
- Created after (`created_after`, date and time): Only objects created after this moment.
- Changed after (`modified_after`, date and time): Only objects changed after this moment.
- Include deleted (`include_deleted`, true/false): Also find objects marked deleted.
- How many (`count`, number): The most to return, 1 to 500. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when more matched than were returned
- `objects` (list): The objects found

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "objects": [
    {
      "checked_out_to": "",
      "checked_out_to_me": false,
      "class_id": 5,
      "class_name": "Minutes",
      "created_at": "2026-11-02T14:05:00Z",
      "display_id": "659",
      "files": [
        {
          "changed_at": "2026-11-02T14:05:00Z",
          "extension": "pdf",
          "file_name": "Council minutes 2026-11-02.pdf",
          "id": 412,
          "name": "Council minutes 2026-11-02",
          "size": 48213,
          "version": 1
        }
      ],
      "id": 659,
      "is_checked_out": false,
      "is_deleted": false,
      "modified_at": "2026-11-02T14:06:00Z",
      "object_type": 0,
      "properties": {
        "Meeting date": "2026-11-02",
        "Name or title": "Council minutes 2026-11-02"
      },
      "property_list": [
        {
          "data_type": "Text",
          "display_value": "Council minutes 2026-11-02",
          "id": 0,
          "lookup_ids": [],
          "name": "Name or title",
          "value": "Council minutes 2026-11-02"
        },
        {
          "data_type": "Lookup",
          "display_value": "Minutes",
          "id": 100,
          "lookup_ids": [
            5
          ],
          "name": "Class",
          "value": "Minutes"
        },
        {
          "data_type": "Date",
          "display_value": "11/2/2026",
          "id": 1021,
          "lookup_ids": [],
          "name": "Meeting date",
          "value": "2026-11-02"
        }
      ],
      "single_file": true,
      "title": "Council minutes 2026-11-02",
      "version": 2
    }
  ]
}
```

### Undelete object

Bring back an object that was marked deleted.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `deleted` (true/false): True when the object is now marked deleted
- `object_id` (number): The object's id
- `object_type` (number): Its object type
- `title` (text): Its title

**Example output**

```json
{
  "deleted": false,
  "object_id": 659,
  "object_type": 0,
  "title": "Council minutes 2026-11-02"
}
```

### Undo check out

Undo the connection's user's check-out of an object, throwing away the changes made since.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```

### Update properties

Change an object's title or property values. Only the ones given change; M-Files keeps a new version.

**Inputs**

- Object type (`object_type`, text, required): The kind of object, such as Document. Pick one, or give its id from an earlier step ('object_type' of a search or trigger).
- Object ID (`object_id`, text, required): The object's id, a whole number, from a search, a view, a trigger or an earlier step.
- Class (`class_id`, text): The object's class, to offer its properties. Leave empty to use the class it has.
- Name or title (`title`, text): The object's name, such as Council minutes 2026-11-02.
- Properties (`properties`, object): New values, one per property of the class. Properties left empty keep their values.

**Outputs**

- `object` (object): The object

**Example output**

```json
{
  "object": {
    "checked_out_to": "",
    "checked_out_to_me": false,
    "class_id": 5,
    "class_name": "Minutes",
    "created_at": "2026-11-02T14:05:00Z",
    "display_id": "659",
    "files": [
      {
        "changed_at": "2026-11-02T14:05:00Z",
        "extension": "pdf",
        "file_name": "Council minutes 2026-11-02.pdf",
        "id": 412,
        "name": "Council minutes 2026-11-02",
        "size": 48213,
        "version": 1
      }
    ],
    "id": 659,
    "is_checked_out": false,
    "is_deleted": false,
    "modified_at": "2026-11-02T14:06:00Z",
    "object_type": 0,
    "properties": {
      "Meeting date": "2026-11-02",
      "Name or title": "Council minutes 2026-11-02"
    },
    "property_list": [
      {
        "data_type": "Text",
        "display_value": "Council minutes 2026-11-02",
        "id": 0,
        "lookup_ids": [],
        "name": "Name or title",
        "value": "Council minutes 2026-11-02"
      },
      {
        "data_type": "Lookup",
        "display_value": "Minutes",
        "id": 100,
        "lookup_ids": [
          5
        ],
        "name": "Class",
        "value": "Minutes"
      },
      {
        "data_type": "Date",
        "display_value": "11/2/2026",
        "id": 1021,
        "lookup_ids": [],
        "name": "Meeting date",
        "value": "2026-11-02"
      }
    ],
    "single_file": true,
    "title": "Council minutes 2026-11-02",
    "version": 2
  }
}
```
