# Automate with n8n

n8n is a workflow automation platform that lets you connect DocuSeal with hundreds of other apps and services. DocuSeal is available in n8n as a [verified node](https://n8n.io/integrations/docuseal/), built by DocuSeal and verified by n8n.

#### Notes:

- The DocuSeal node works in both n8n Cloud and self-hosted n8n.
- n8n supports DocuSeal accounts created on both [docuseal.com](https://docuseal.com) and [docuseal.eu](https://docuseal.eu).
- **DocuSeal On-Premises** is supported as well. When connecting your account, set **Server Domain** to the API URL of your instance, e.g. `https://docuseal.example.com/api`.
- DocuSeal triggers deliver events to n8n via webhooks, so a self-hosted n8n instance must be reachable from the internet.

### Available triggers and actions

- **On signing form completed** — triggered when one of the signers completes signing.
- **On submission completed** — triggered when all signers have signed the document.
- **Create submission** — creates a new signature request from a template.
- **Create submission from PDF** — creates a one-off signature request from a PDF file.
- **Create submission from DOCX** — creates a one-off signature request from a DOCX file with dynamic content variables.
- **Create submission from HTML** — creates a one-off signature request from HTML content.
- **Update signer** — updates signer details, pre-fills or updates field values, and re-sends emails.

## How to install the DocuSeal node

1. Log in to your n8n instance and open a workflow or create a new one.
2. Click **+** in the top right corner to open the nodes panel.
3. Search for **DocuSeal** and select it. The node is marked as verified and published by **DocuSeal LLC**.
4. Click **Install node**. Verified nodes need to be installed once by the instance owner, after that everyone on the instance can use them.
5. Done! The DocuSeal triggers and actions are now available in the nodes panel.

## How to connect your DocuSeal account

1. Add any DocuSeal trigger or action to your workflow.
2. In the **Credential** field, click **Connect to DocuSeal**.
3. Make sure **Access Token** is selected in the top right corner of the window.
4. In **Server Domain**, keep `https://api.docuseal.com` if your account is on docuseal.com, or enter `https://api.docuseal.eu` if it’s on docuseal.eu.
5. In **API Key**, paste your API key from the DocuSeal Console: [console.docuseal.com/api](https://console.docuseal.com/api) or [console.docuseal.eu/api](https://console.docuseal.eu/api).
6. Click **Save**. The same credential can be used in all DocuSeal nodes.

## How to create a workflow with a DocuSeal trigger

1. Create a new workflow and click **Add first step**.
2. Search for **DocuSeal** and select a trigger, for example, **On submission completed**.
3. In the **Credential** field, select your DocuSeal account or connect a new one.
4. In **Event**, make sure the right event is selected, for example, **Submission Completed**.
5. Click **Execute step**, then complete a submission in DocuSeal. n8n registers the webhook in your DocuSeal account automatically, and the event appears in the **Output** panel.
6. Add the next steps of your workflow, for example, save the signed documents to cloud storage or send a notification.
7. Click **Publish** to start receiving events.

## How to create a workflow with a DocuSeal action

1. Create a new workflow and add the trigger that should start it. To try the action manually, use **Manual Trigger**.
2. Click **+** after the trigger, search for **DocuSeal**, and select **Create submission**.
3. In the **Credential** field, select your DocuSeal account or connect a new one.
4. In **Template Name or ID**, choose the template you want to send. If it’s not listed, create one in your DocuSeal account.
5. Under **Signers**, click **Add Signer** and fill in the following fields: 
     - 5.1 In **Signer Role**, enter the role name from your template, e.g. **First Party**.
     - 5.2 In **Email**, enter the signer’s email address or map it from the previous step.
6. Configure other fields if needed, such as **Name**, **Send Email**, or **Values (Pre-Fill Fields)** to pre-fill template fields.
7. Click **Execute step** to test the action, then open your template in DocuSeal and check that a new submission was created.
8. Done! Replace **Manual Trigger** with the trigger you need and click **Publish** to run the workflow automatically.