Skip to content

Workflows

Send NDAs in bulk from n8n

An n8n workflow that creates one mutual NDA envelope per row from a DOCX template, paced with the HTTP Request node's batching to stay inside the rate limit.

One run sends a mutual NDA to every counterparty on your list. Each row becomes its own envelope from the mutual NDA template. The HTTP Request node paces the requests, so a long list stays inside the rate limit.

A successful run of the NDA batch workflow: Run, Counterparties, Build envelopes and Create envelope each have a green check, with 1 item, then 3 items, passed between them
A successful run

Before you start

How the workflow runs

  1. Run (Manual Trigger) starts it. Use a Schedule Trigger or another trigger in production.
  2. Counterparties (Code) returns one item per row. Replace it with your source, such as a spreadsheet or CRM node.
  3. Build envelopes (Code) turns each row into an envelope body.
  4. Create envelope (HTTP Request) runs once per item and sends each body to POST /v1/envelopes.

For the finished workflow, download nda-batch.json from GitHub and import it into n8n.

Build it

1

Counterparties: sample rows

Add a Code node that returns your rows. Each needs company, address, signer_name and signer_email:

Counterparties
// One item per counterparty. Replace this node with your source (a spreadsheet, a database, a CRM).
return [
  { json: { company: 'Globex Example Ltd', address: '5 Sample Road, Shelbyville', signer_name: 'John Smith', signer_email: 'john.smith@example.com' } },
  { json: { company: 'Example Partners LLC', address: '9 Test Street, Springfield', signer_name: 'Jane Doe', signer_email: 'jane.doe@example.com' } },
  { json: { company: 'Sample Holdings Inc', address: '77 Demo Avenue, Shelbyville', signer_name: 'Maria Garcia', signer_email: 'maria.garcia@example.com' } },
];
2

Build envelopes: one body per row

Add a Code node in Run Once for All Items mode. Replace REPLACE_WITH_YOUR_TEMPLATE_URL with your stored template’s URL:

Build envelopes
// Builds one envelope per counterparty from the mutual NDA template.
const TEMPLATE_URL = 'REPLACE_WITH_YOUR_TEMPLATE_URL'; // the stored mutual-nda template
const ACME = { name: 'Acme Corp', address: '100 Example Street, Springfield', signatory: 'Alex Chen', signatoryTitle: 'Head of Operations', email: 'alex.chen@example.com' };

return $input.all().map(({ json: row }) => ({
  json: {
    company: row.company,
    envelope: {
      title: `Mutual NDA: ${row.company}`,
      message: 'Please review and sign the mutual NDA.',
      routing: 'parallel', // both parties get it at once and sign in any order
      metadata: { counterparty: row.company },
      documents: [
        {
          key: 'nda',
          url: TEMPLATE_URL,
          format: 'docx',
          data: {
            effectiveDate: new Date().toISOString().slice(0, 10),
            partyA: { name: ACME.name, signatory: ACME.signatory, signatoryTitle: ACME.signatoryTitle, address: ACME.address },
            partyB: { name: row.company, address: row.address, signatory: row.signer_name },
            purpose: 'a possible business relationship',
            termYears: '2',
            survivalYears: '3',
            governingLaw: 'the State of Delaware',
          },
          places: [
            { key: 'party_a_signs_here', type: 'signature', recipient_key: 'party_a' },
            { key: 'party_b_signs_here', type: 'signature', recipient_key: 'party_b' },
          ],
        },
      ],
      recipients: [
        { type: 'signer', key: 'party_a', name: ACME.signatory, email: ACME.email },
        { type: 'signer', key: 'party_b', name: row.signer_name, email: row.signer_email },
      ],
    },
  },
}));
3

Create envelope: paced requests

Add an HTTP Request node:

SettingValue
MethodPOST
URLhttps://api.signatureapi.com/v1/envelopes
AuthenticationGeneric Credential Type, Generic Auth Type Header Auth, credential SignatureAPI test key
Send BodyOn, Body Content Type JSON, Specify Body Using JSON
JSON{{ JSON.stringify($json.envelope) }}
Options > BatchingItems per Batch 5, Batch Interval (ms) 1000
SettingsRetry On Fail on, Max. Tries 3, Wait Between Tries (ms) 5000

The default limit is 10 requests per second per API key, with a burst of 10. Five requests per second leaves room for other calls with the same key. If a request still gets a 429, Retry On Fail sends it again after 5 seconds.

Try it

Select Execute at the bottom of the canvas. Create envelope shows 3 items: one test envelope per counterparty, each with its own id. Both parties of each NDA get it at once (routing: "parallel") and can sign in any order.

Make it yours

  • Your list. Replace Counterparties with a Google Sheets, Airtable or database node that outputs the same four fields, or map your column names in Build envelopes.
  • Avoid duplicates. A second run sends every NDA again. Keep a “sent” column in your source, filter on it, and write the envelope id back after Create envelope.
  • Track replies. data.envelope_metadata.counterparty comes back in every event for the envelope, so the signed PDF workflow can file each signed NDA under its company.