> 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 cloud storage extension workflow test

> Learn how to test a file output cloud storage extension from a Maestro workflow.

This procedure explains how to set up and execute a [functional test](/extension-apps/build-an-extension-app/test/functional-tests) that invokes a [file output cloud storage extension](/extension-apps/extension-apps-101/supported-extensions/file-output-cloud-storage) from a [workflow](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=dnx1696972415150.html). For this test, you configure and run a workflow that displays a document for signature and writes the signed document to a cloud storage system.

The high-level steps to create and run this test are:

* [Step 1. Identify or create an eSignature template](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-1-identify-or-create-an-esignature-template)
* [Step 2. Create and publish the workflow](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-2-create-and-publish-the-workflow)
* [Step 3. Execute a workflow instance](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-3-execute-a-workflow-instance)

This is one of many possible approaches to setting up a workflow. For additional options, see the [workflow user documentation](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=dnx1696972415150.html).

> **Warning**
>
> Make sure that you’ve completed all the requirements listed for functional tests in [Test prerequisites](/extension-apps/build-an-extension-app/test#test-prerequisites).

## Step 1. Identify or create an eSignature template

Before you create the workflow, make sure that you have an eSignature [template](https://support.docusign.com/s/document-item?bundleId=xry1643227563338\&topicId=dqj1578456412286.html\&rsc_301) in your account that you can use in a signing step in the workflow. The document to be signed in that step will be derived from the template. You can [use an existing eSignature template](https://support.docusign.com/s/document-item?bundleId=xry1643227563338\&topicId=epp1578456404448.html) in your account, or [create a new template](https://support.docusign.com/s/document-item?bundleId=xry1643227563338\&topicId=lsg1578456368117.html).

When selecting or creating a template:

* For a simpler workflow setup, the template should have a single recipient instead of multiple recipients.
* The recipient type must be **Needs to Sign**.
* Do not hard-code a recipient name or email in the template.
* Make sure that the template document includes, at minimum, a Signature tab.

See [Template Requirements](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=xnw1709852160602.html) for additional information about templates to be used with a workflow signing step.

## Step 2. Create and publish the workflow

To create a workflow that tests a file output cloud storage extension:

1. Log in to the [Workflow Designer](https://apps-d.docusign.com/send/workflows/).
2. Follow the steps in [Create a Basic Workflow](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=uhm1697826856678.html)﻿ to create and save a workflow. When creating a workflow, select **Blank Workflow**. Your workflow should include:

   * The workflow [start method](https://support.docusign.com/s/document-item?language=en_US\&bundleId=yff1696971835267\&topicId=ztb1727892686033.html) **From within Workflow Builder**.
   * A participant who will sign a document that will be written to cloud storage. See [Workflow participant](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#workflow-participant) for configuration guidelines.
   * A step that defines an eSignature template containing a document to be signed. See [Prepare eSignature Template step](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#prepare-esignature-template-step)﻿ for configuration guidelines.
   * A step that displays a document for signature. See [Send Documents for Signature step](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#send-documents-for-signature-step) for configuration guidelines.
   * A step that invokes your extension app to write the signed document to cloud storage. See [File output cloud storage extension step](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#file-output-cloud-storage-extension-step) for configuration guidelines.
   * A step that displays a message confirming that all workflow steps are complete. See [Show a Confirmation Screen step](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#show-a-confirmation-screen-step) for configuration guidelines.

     When youʼve finished configuring the start method, workflow participant, and the steps, the workflow should appear as shown.
3. Complete the steps in [Review and Publish a Workflow](https://support.docusign.com/s/document-item?language=en_US\&bundleId=yff1696971835267\&topicId=iqm1698272226447.html)﻿. Then you can [execute instances of the workflow](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-3-execute-a-workflow-instance) to test your extension app.

![Workflow steps](/_fern-files/_img/cbdf3d328bfdc8aeef45afbac558e3450ffb4349b677f6dadce64a3c96e17309.webp)

### Workflow participant

Although a workflow can have multiple participants, you only need a single participant for a workflow that invokes a file output cloud storage extension. [Define Workflow Participants](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=ypt1698264964168.html) has information about configuring a participant. The participant role name that you enter will be displayed on configuration screens for workflow steps that require selection of a participant.

### Prepare eSignature Template step

The first step in your workflow should be a **Prepare eSignature Template** step . A procedure for adding this type of step appears in [Configure a Prepare eSignature Template step ](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=tskd83cc960-fb4b-4534-9573-1041591501e2.html).

When you add this step, configure the settings as follows:

| Setting                                | Value                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Select a template                      | Select the eSignature template that you created for the workflow test, or an existing template that you've identified for use with the test. See [Step 1. Identify or create an eSignature template](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-1-identify-or-create-an-esignature-template) for more information. |
| Map template fields to workflow fields | Optional. This enables you to populate fields on the document with values from the workflow, so that you don't have to enter values during the signing process when you execute the test.                                                                                                                                                                                    |

![Prepare eSignature Template step](/_fern-files/_img/fb98bb217cab7a306f5afb723ae98883858ff31029a857e142f7d5ad8286bdf0.webp)

### Send Documents for Signature step

The next step in your workflow should be a **Send Documents for Signature** step, which generates an eSignature envelope for the workflow participant to sign. A procedure for adding this type of step appears in [Configure a Send Documents for Signature Step ](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=uww1698167288211.html).

When you add this step, configure the settings as follows:

| Setting                                | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| What documents would you like to send? | Select the template associated with the **Prepare eSignature Template** step.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Choose direct or remote signing        | Select **Use a direct signing session**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Confirm recipient details              | The role name associated with the recipient from your eSignature template is displayed here. Select the participant role name you entered when you configured the [workflow participant](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#workflow-participant)**.** Supply a name and email address for the recipient, either by hard-coding values or selecting workflow variables. With a direct signing session, Docusign does not send an email to the supplied address when executing workflow instances. |

![Get Signatures step](/_fern-files/_img/31486c3416c92332cc0e3e987c8d4c0beb1b3d54d5db9dccc0f42f874875b5d8.webp)

### File output cloud storage extension step

This step will invoke your extension app.

To add this step, display the **Apps** tab on the **Add New Step** panel and select the extension thatʼs defined in your extension app registration. The **Add New Step** panel displays the values from the [extensions.name](/extension-apps/extension-app-reference/app-manifest-reference/extension) and [extensions.description](/extension-apps/extension-app-reference/app-manifest-reference/extension) properties in the app manifest.

![File output step selection](/_fern-files/_img/f4744f11df37a0b75601a812df079e50caab105e88bb278804ab888eeda81f18.webp)

**Note:** The step for your extension will not appear in the **Connected Apps** list if the extension app is not [installed and connected](https://support.docusign.com/s/document-item?bundleId=ous1698169987748\&topicId=ctg1698170340729.html) to your account.

When you configure this step, these capabilities will be invoked if they are implemented in the extension app [registration](/extension-apps/build-an-extension-app/register):

* [List Drives](/extension-apps/extension-app-reference/extension-contracts/file-output-cloud-storage#list-drives): Enables the step configuration page to retrieve a list of drives (or similar structures that contain folders and files) on the cloud storage system. If the app registration does not include this capability, the UI will not display the drive selection control.
* [List Directory Contents](/extension-apps/extension-app-reference/extension-contracts/file-output-cloud-storage#list-directory-contents): Enables the step configuration page to retrieve a list of folders from the selected drive (or similar container type) or directory. If the app registration does not include this capability, the UI will not display folder selection controls.

When you [execute an instance](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#step-3-execute-a-workflow-instance) of the workflow, this step invokes the [Write File](/extension-apps/extension-app-reference/extension-contracts/file-output-cloud-storage#write-file) action defined in the extension app registration.

When you add this step, configure the settings as follows:

| Setting                   | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| What are you storing?     | **Files to archive:** Select **Send Documents for Signature.Combined Envelope File** This instructs the workflow to store the signed document from the **Send Documents for Signature** step.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Where are you storing it? | **Select connection**: Select the default connection. **Select drive:** This setting appears only if the extension app registration includes the **List Drives** capability. Select the destination drive (or similar container type) on the cloud storage system. **Add Folder:** This setting appears only if the extension app registration includes the **List Directory Contents** capability. Select **Add Folder** to display a folder list. After selecting a folder, you can select **Add Subfolder** one or more times to drill down further in the directory structure. Instead of selecting an existing folder, you can select **New Folder** and then define a naming convention for a folder to be created at workflow instance run time. The naming convention can include hardcoded text, [workflow variables](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#workflow-variables), or a combination of the two. |
| What will you call it?    | Define a naming convention for the file. The naming convention can include hardcoded text, [workflow variables](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#workflow-variables), or a combination of the two.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

![File output cloud storage step](/_fern-files/_img/5e6f17f558cc481efc90e8674fb569c03161f54b9e0c41d302e0697923d60d8a.webp)

#### Workflow variables

When defining the naming convention for files to be written or folders to be created on the cloud storage system, you can include workflow variables in the name. Variables will be populated with values at workflow instance run time. This enables you to define a naming convention that results in a unique name for each agreement to be stored.

The types of variables available for selection include:

* **Workflow step variables.** For example, variables associated with the **Send Documents for Signature** step include the unique ID of the eSignature envelope and values from the envelope fields.
* **Workflow participant variables**. These are values associated with the customer who completes the steps in a workflow instance. They include the participant name and email address.
* **Workflow instance variables.** These are values associated with the workflow instance, such as the instance ID and the start date and time.

> **Note**
>
> Docusign recommends testing with both hardcoded file and folders names, as well as file and folder names that include one or more variables, because the external API service must handle both cases. See the [Write File](/extension-apps/extension-app-reference/extension-contracts/file-output-cloud-storage#write-file) action contract for details.

### Show a Confirmation Screen step

The last step in your workflow should be a **Show a Confirmation Screen** step, which displays a message to indicate that the workflow is complete. A procedure for adding this type of step appears in [Configure a Show a Confirmation Screen Step ](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=rpc1698682081448.html).

When you add this step, configure the settings as follows:

| Setting       | Value                                                                                                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Participant   | Select the role name you entered when you configured the [workflow participant](/extension-apps/build-an-extension-app/test/functional-tests/file-output-cloud-storage-workflow#workflow-participant). |
| Message type  | End of participantʼs tasks                                                                                                                                                                             |
| Message title | Keep the default value                                                                                                                                                                                 |
| Message body  | Keep the default value                                                                                                                                                                                 |

## Step 3. Execute a workflow instance

After you've published your test workflow, you can execute an instance of it, run through the steps as a customer would, and make sure that the file is written to the cloud storage system successfully. You can [monitor the progress](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=vcp1698707326210.html) of the workflow instance as it executes.

To execute a workflow instance:

1. Follow the steps in the **From Within Workflow Builder** section of [How to Start a Workflow](https://support.docusign.com/s/document-item?bundleId=yff1696971835267\&topicId=glx1730400747416.html) to execute a workflow instance.

   The document to be signed is displayed in your browser.
2. Complete the signing process.

   The file output step is executed and the confirmation page is displayed.
3. Check the cloud storage location to which the external service stores files and confirm that the file output step succeeded.

> **Warning**
>
> If your extension is not invoked successfully, run the Developer Console [connection and extension tests](/extension-apps/build-an-extension-app/test/integration-tests) for the extension app to get detailed error messages and troubleshoot.

## Next steps

* Find out more about [functional tests](/extension-apps/build-an-extension-app/test/functional-tests).
* Review the [File output cloud storage extension contract reference](/extension-apps/extension-app-reference/extension-contracts/file-output-cloud-storage).
* Learn how to run [integration tests](/extension-apps/build-an-extension-app/test/integration-tests).