Skip to navigation

File output tabular format extension contract reference

View as Markdown

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. If you register the extension app using a 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

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, 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 for a complete sample app manifest for file output to tabular format.

Form-based UI nameApp manifest actions.template valueApp manifest actions.name valueApp manifest extensions.capabilities valueRequired
Export To DestinationFileIO.Version1.ExportToDestinationexport-to-destinationN/AYes
List HeadersFileIO.Version1.ListHeaderslist-headersN/AYes
List Directory ContentsFileIO.Version1.ListDirectoryContentslist-directory-contentsFileIO.Version1.ListDirectoryContentsNo
List DrivesFileIO.Version1.ListDriveslist-drivesFileIO.Version1.ListDrivesNo

During the form-based extension app registration process, if you select a file IO extension, its required actions are automatically added to the app. You can then configure the actions’ endpoint URIs and other properties on the Integration Details page. The extension’s optional capabilities can be added or removed only by editing the app manifest file. After you’ve added capabilities via the manifest file, you can edit them on the Integration Details page. See Action schema for information about action and capability properties in the app manifest file.

Action contracts

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

{
"destinationId": "abc123",
"headers": ["Name”,”Email”,”Date"],
"data": [
[
"John Doe”,”john@example.com”,”2024-10-24"],
"Jane Smith”,”jane@example.com”,”2024-10-23"
]
]
}
PropertyTypeOccurenceDescription
destinationIdStringRequiredThe unique identifier of the target destination.
dataString[][]RequiredA 2D string array representing the rows to be appended.
headersString[]RequiredAn array of strings representing the column names/headers.

Response

{
"success": false,
"errorMessage": “An error occurred while exporting the headers - too many requests.”
}
PropertyTypeOccurenceDescription
successbooleanRequiredIndicates whether the data was successfully written.
errorMessagestringOptionalOptional field to capture any error messages.

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, the action must be defined in the actions object. See Action schema 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.

{
"destinationId": "abc_134"
}
PropertyTypeOccurrenceDescription
destinationIdStringRequiredThe 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.

{
"success": true,
"headers": [“Name”,”Email”,”Date”,”Amount"],
"errorMessage": null
}
PropertyTypeOccurrenceDescription
successbooleanRequiredIndicates whether the operation was successful.
errorMessagestringOptionalOptional field to capture any error messages.
headers[]StringOptionalArray of strings representing the column names/headers.

This optional capability 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.

If you register your extension app using an app manifest file, make sure that you:

  1. Include a definition for the capability in the actions object. See Action schema 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 for details about the actionReferences and capabilities arrays. See Example extension app use cases 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:

{
"filterOptions": {
"entryType": "folder"
},
"parentId": "drive-id-1"
}
PropertyTypeOccurrenceDescription
parentIdStringRequiredOne 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.entryTypeStringOptionalValid value: folder

Response

{
"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"
}
]
}
PropertyTypeOccurrenceDescription
parentIdStringRequiredThe external service should return the same parentId value that was supplied in the List Directory Contents request.
dataObject[]RequiredAn array of folders in the drive (or similar container type) or directory specified in the request’s parentId property.
data.typeStringRequiredValid value: folder
data.nameStringRequiredThe folder name. Maestro displays the name value in the folder list on the file output step configuration page.
data.idStringRequiredThe 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.parentIdStringRequiredThis value should be the same as the parentId.

This optional capability 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.

If you register your extension app using an app manifest file, make sure that you:

  1. Include a definition for the capability in the actions object. See Action schema 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 for details about the actionReferences and capabilities arrays. See Example extension app use cases 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

{
"containerType": "drive",
"parentId": ""
}
PropertyTypeOccurrenceDescription
containerTypeStringRequiredValid 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.
parentIdStringOptionalDocusign includes this property in requests but does not populate it with a value.

Response

{
"containerType": "drive",
"data": [
{
"containerId": "drive-id-1",
"containerName": "Drive 1"
},
{
"containerId": "drive-id-2",
"containerName": "Drive 2"
}
]
}
PropertyTypeOccurrenceDescription
containerTypeStringRequiredValid 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.
dataObject[]RequiredAn array of drives or similar structures that contain folders and files.
data.containerIdStringRequiredA 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.containerNameStringRequiredThe 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 of the file output tabular format extension and how it can be used.
  • Explore different options for testing your extension.
  • Find out about other supported extensions.