> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# File output tabular format extension contract reference

> Get technical details about file output tabular format extension requests and responses.

The file output tabular format extension exports data from a Workflow Builder workflow to an existing tabular format file stored in a cloud provider like Google Drive or Sharepoint.

You can include this extension when you [register an extension app](/extension-apps/build-an-extension-app/register). If you register the extension app [using a form](/extension-apps/build-an-extension-app/register/use-form), select the **File Output Tabular Format** extension in the form-based UI, as shown in this figure:

![Selecting the file output tabular format when registering an extension app](/_fern-files/_img/45fae4c23511c3e77f0a2c9bd47aaf6631a64aa10902db51fc89aa18a413badf.webp)

> **Note**
>
> In the current release, users can export data only to an existing spreadsheet. Creating a new spreadsheet from within the extension is not yet supported.

If you register the extension app [using an app manifest file](/extension-apps/build-an-extension-app/register/use-manifest)[,](/extension-apps/build-an-extension-app/register/use-manifest) set the `extensions.template` value in your app manifest to `FileIO.Version1.FileOutputTabularFormat`.

This extension has two required actions and two optional capabilities. Below is a list of their identifiers as they appear in the form-based app registration UI and the app manifest. See [Example extension app use cases](/extension-apps/build-an-extension-app/example-use-case) for a complete sample app manifest for file output to tabular format.

| Form-based UI name      | App manifest actions.template value     | App manifest actions.name value | App manifest extensions.capabilities value | Required |
| ----------------------- | --------------------------------------- | ------------------------------- | ------------------------------------------ | -------- |
| Export To Destination   | `FileIO.Version1.ExportToDestination`   | `export-to-destination`         | N/A                                        | Yes      |
| List Headers            | `FileIO.Version1.ListHeaders`           | `list-headers`                  | N/A                                        | Yes      |
| List Directory Contents | `FileIO.Version1.ListDirectoryContents` | `list-directory-contents`       | `FileIO.Version1.ListDirectoryContents`    | No       |
| List Drives             | `FileIO.Version1.ListDrives`            | `list-drives`                   | `FileIO.Version1.ListDrives`               | No       |

> **Note**
>
> During the form-based extension app registration process, if you select a [file IO extension](/extension-apps/extension-apps-101/supported-extensions), its required actions are automatically added to the app. You can then configure the actions' endpoint URIs and other properties on the [Integration Details](/extension-apps/build-an-extension-app/register/use-form/integration-details) page. The extension's optional capabilities can be added or removed only by [editing the app manifest file](/extension-apps/build-an-extension-app/update-registration/use-manifest). After you've added capabilities via the manifest file, you can edit them on the Integration Details page. See [Action schema](/extension-apps/extension-app-reference/app-manifest-reference/action) for information about action and capability properties in the app manifest file.

## Action contracts

#### Export To Destination (FileIO.Version1.ExportToDestination)

This required action writes the exported data to a specified destination and can be triggered from a Maestro workflow. The data is passed as a 2D array of strings, where each sub-array represents a row, and headers are provided as an array of strings.

**Export To Destination** is responsible for validating headers, setting headers if absent, and exporting the data to the destination. An example implementation could involve retrieving destination headers, comparing them with provided headers for data integrity, setting headers if the destination is blank, and then appending rows if headers match, returning a success or failure response. If headers do not match, an error is returned to prevent data corruption. The app manifest defines how Maestro recognizes and executes the `exportToDestination` action within a workflow, including the configuration details needed to authenticate and call the backend process that performs the export.

### HTTP method

This action initiates a POST request to the external API service.

### Request

```text
{
  "destinationId": "abc123",
  "headers": ["Name”,”Email”,”Date"],
  "data": [
    [
       "John Doe”,”john@example.com”,”2024-10-24"],
       "Jane Smith”,”jane@example.com”,”2024-10-23"
    ]
  ]
}
```

| Property        | Type         | Occurence | Description                                                |
| --------------- | ------------ | --------- | ---------------------------------------------------------- |
| `destinationId` | `String`     | Required  | The unique identifier of the target destination.           |
| `data`          | `String[][]` | Required  | A 2D string array representing the rows to be appended.    |
| `headers`       | `String[]`   | Required  | An array of strings representing the column names/headers. |

### Response

```text
{
   "success": false,
   "errorMessage": “An error occurred while exporting the headers - too many requests.”
}
```

| Property       | Type      | Occurence | Description                                          |
| -------------- | --------- | --------- | ---------------------------------------------------- |
| `success`      | `boolean` | Required  | Indicates whether the data was successfully written. |
| `errorMessage` | s`tring`  | Optional  | Optional field to capture any error messages.        |

#### List Headers (FileIO.Version1.ListHeaders)

This required action contract is called by the configurator to verify that the selected destination can accommodate the data being exported. During this step, the system checks whether the destination sheet contains enough columns to match the number of variables provided. If the column counts don’t align, the configurator prompts the user to create a new destination or adjust the selected fields. When the destination has enough columns to hold all exported values, the configuration process is considered complete.

The **List Headers** action is part of the `ExportTabularData` extension contract.

When registering an extension app [using an app manifest file](/extension-apps/build-an-extension-app/register/use-manifest), the action must be defined in the actions object. See [Action schema](/extension-apps/extension-app-reference/app-manifest-reference/action) for details about the required properties. The action definition must include these values, which are specific to this action:

* `name: list-headers`
* `template: FileIO.Version1.ListHeaders`

The value from actions.name (`list-headers`) is included in the `extensions.actionReferences` array.

### Request

The request requires the unique identifier of the target destination.

```text
{
    "destinationId": "abc_134"
}
```

| Property        | Type     | Occurrence | Description                                      |
| --------------- | -------- | ---------- | ------------------------------------------------ |
| `destinationId` | `String` | Required   | The unique identifier of the target Destination. |

### Response

The response indicates whether the operation was successful and may return column headers for reference. Variables are written to existing columns in order rather than by name.

```text
{
    "success": true,
    "headers": [“Name”,”Email”,”Date”,”Amount"],
    "errorMessage": null
}
```

| Property       | Type       | Occurrence | Description                                             |
| -------------- | ---------- | ---------- | ------------------------------------------------------- |
| `success`      | `boolean`  | Required   | Indicates whether the operation was successful.         |
| `errorMessage` | `string`   | Optional   | Optional field to capture any error messages.           |
| `headers`      | `[]String` | Optional   | Array of strings representing the column names/headers. |

#### List Directory Contents (FileIO.Version1.ListDirectoryContents)

This optional [capability](/extension-apps/extension-apps-101/concepts/capabilities) can be implemented for a file output tabular format extension. It returns a list of folders on the cloud storage system. If this capability is implemented, a workflow process builder can select from a list of folders when configuring a file output step or specify a naming convention for a new folder to be created.

Maestro can call **List Directory Contents** multiple times as a process builder configures a file output step, to enable the process builder to drill down in the folder structure. For example, the process builder can select **Add Folder** to choose a top-level folder. The process builder can then select **Add Subfolder** to choose a folder one level lower. Additional selections of **Add Subfolder** can be made to drill down further, and each time, a **List Directory Contents** request is executed.

**List Directory Contents** is the label that appears when you register an extension app [using a guided, form-based process](/extension-apps/build-an-extension-app/register/use-form).

If you register your extension app [using an app manifest file](/extension-apps/build-an-extension-app/register/use-manifest), make sure that you:

1. Include a definition for the capability in the `actions` object. See [Action schema](/extension-apps/extension-app-reference/app-manifest-reference/action) for details about the required properties. The action definition must include these values, which are specific to this capability:

   * `name: list-directory-contents`
   * `template: FileIO.Version1.ListDirectoryContents`
2. Include the value from the `actions.name` property in the `extensions.actionReferences` array.
3. Include the value from the `actions.template` property in the `extensions.capabilities` array.

See [Extension schema](/extension-apps/extension-app-reference/app-manifest-reference/extension) for details about the `actionReferences` and `capabilities` arrays. See [Example extension app use cases](/extension-apps/build-an-extension-app/example-use-case) for a complete sample app manifest for file output to cloud storage.

### HTTP method

This action initiates a POST request to the external API service.

### Request

Request when **List Directory Contents** is called after after a process builder selects a drive (or similar container type) and then selects **Add Folder**:

```text
{
  "filterOptions": {
    "entryType": "folder"
  },
  "parentId": "drive-id-1"
}
```

| Property                  | Type     | Occurrence | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parentId`                | `String` | Required   | One of the following:- If the extension app implements **List Drives** and a process builder has selected a drive (or similar container type) and then selects **Add Folder**, this value will be the ID of the selected container. Container IDs are returned in the response to the **List Drives** request.
- If the extension app does not implement **List Drives** and a process builder selects **Add Folder**, this value will be `root`.
- If the process builder has already selected a folder and selects **Add Subfolder**, this value will be the ID of the previously selected folder. |
| `filterOptions.entryType` | `String` | Optional   | Valid value: `folder`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

### Response

```text
{
  "parentId":"drive-id-1"
  "data":[
    {
      "type":"folder",
      "name":"Folder 1",
      "id":"folder-id-1",
      "parentId":"drive-id-1"
    },
    {
      "type":"folder",
      "name":"Folder 2",
      "id":"folder-id-2",
      "parentId":"drive-id-1"
    }
  ]
}
```

| Property        | Type       | Occurrence | Description                                                                                                                                                                                                                                                                 |
| --------------- | ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parentId`      | `String`   | Required   | The external service should return the same `parentId` value that was supplied in the **List Directory Contents** request.                                                                                                                                                  |
| `data`          | `Object[]` | Required   | An array of folders in the drive (or similar container type) or directory specified in the request's `parentId` property.                                                                                                                                                   |
| `data.type`     | `String`   | Required   | Valid value: `folder`                                                                                                                                                                                                                                                       |
| `data.name`     | `String`   | Required   | The folder name. Maestro displays the `name` value in the folder list on the file output step configuration page.                                                                                                                                                           |
| `data.id`       | `String`   | Required   | The folder ID. If a workflow process builder selects **Add Subfolder** during file output step configuration to drill down further in the directory structure, the `id` of the selected folder will be passed as the `parentId` in the **List Directory Contents** request. |
| `data.parentId` | `String`   | Required   | This value should be the same as the `parentId`.                                                                                                                                                                                                                            |

#### List Drives (FileIO.Version1.ListDrives)

This optional [capability](/extension-apps/extension-apps-101/concepts/capabilities) can be implemented for a file output cloud storage extension. It returns the drives available in the cloud storage system. If this capability is implemented, a workflow process builder can select from a list of drives when configuring a file output step.

**Note:** If the cloud storage system does not have the concept of drives and instead organizes folders and files under a different container type, this capability can retrieve a list of those containers instead. They will appear in the file output step configuration pageʼs **Select drive** list.

**List Drives** is the label that appears when you register an extension app [using a guided, form-based process](/extension-apps/build-an-extension-app/register/use-form).

If you register your extension app [using an app manifest file](/extension-apps/build-an-extension-app/register/use-manifest), make sure that you:

1. Include a definition for the capability in the `actions` object. See [Action schema](/extension-apps/extension-app-reference/app-manifest-reference/action) for details about the required properties. The action definition must include these values, which are specific to this capability:

   * `name: list-drives`
   * `template: FileIO.Version1.ListDrives`
2. Include the value from the `actions.name` property in the `extensions.actionReferences` array.
3. Include the value from the `actions.template` property in the `extensions.capabilities` array.

See [Extension schema](/extension-apps/extension-app-reference/app-manifest-reference/extension) for details about the `actionReferences` and `capabilities` arrays. See [Example extension app use cases](/extension-apps/build-an-extension-app/example-use-case) for a complete sample app manifest for file output to cloud storage.

### HTTP method

This action initiates a POST request to the external API service.

### Request

```text
{
  "containerType": "drive",
  "parentId": ""
}
```

| Property        | Type     | Occurrence | Description                                                                                                                                                                                                                                |
| --------------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `containerType` | `String` | Required   | Valid value: `drive` **Note:** If the cloud storage system does not have the concept of drives and instead organizes folders and files under a different container type, the request will still have a value of `drive` for this property. |
| `parentId`      | `String` | Optional   | Docusign includes this property in requests but does not populate it with a value.                                                                                                                                                         |

### Response

```text
{
  "containerType": "drive",
  "data": [
    {
      "containerId": "drive-id-1",
      "containerName": "Drive 1"
    },
    {
      "containerId": "drive-id-2",
      "containerName": "Drive 2"
    }
  ]
}
```

| Property             | Type       | Occurrence | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `containerType`      | `String`   | Required   | Valid value: `drive` **Note:** If the cloud storage system does not have the concept of drives and instead organizes folders and files under a different container type, the response must still have a value of `drive` for this property.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data`               | `Object[]` | Required   | An array of drives or similar structures that contain folders and files.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `data.containerId`   | `String`   | Required   | A unique ID for the drive or other container type. If the extension app implements **List Directory Contents** as well as **List Drives**, a `containerId` returned in this response will be included in a subsequent **List Directory Contents** request as follows:1) A workflow process builder selects from a list of drives (or other containers) on the file output step configuration page.
2) The process builder selects **Add Folder** on the step configuration page.
3) Docusign launches a **List Directory Contents** request to the external system that includes the `containerId` of the container selected in step 1 so that the external system can retrieve a list of folders from the selected container. |
| `data.containerName` | `String`   | Required   | The name of the drive or other container type. Maestro displays `containerName` values in a list on the file output step configuration page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Error handling

The external system should return a 200 response code to Docusign if a request succeeded. Any other response code indicates that the request was not successfully executed.

This applies to all actions and capabilities. Developers are responsible for providing a code and message for each error.

## Next steps

* Get an [overview](/extension-apps/extension-apps-101/supported-extensions/file-output-tabular-format) of the file output tabular format extension and how it can be used.
* Explore different options for [testing](/extension-apps/build-an-extension-app/test) your extension.
* Find out about other [supported extensions](/extension-apps/extension-apps-101/supported-extensions).