Auto-file completed Documenso contracts in Box and Sheets

By General Input

When a contract finishes signing, the signed PDF and its certificate land in Box by quarter, your register updates and your ops channel hears about it.

Integrations

  • Documenso
  • Box
  • Google Sheets
  • Slack Bot

Type

Deterministic Code

Categories

  • Operations
  • Sales

Whenever a Documenso envelope is completed, file it automatically so nobody ever has to dig through email for a signed contract again. Trigger this workflow on the Documenso webhook for the document completed event.

Start by taking the envelope id from the webhook payload and calling Documenso Get Envelope to read the envelope title, the completion timestamp, the envelope items and the full recipient list with every signer name and email.

Then call Download Envelope Item to get the signed PDF for each item in the envelope, and Download Envelope Certificate PDF to get the signing certificate. Keep both. The certificate is what proves who signed and when if the contract is ever disputed, so it belongs in the archive alongside the contract itself.

Upload both files to Box with Upload File, into a folder path organised by year and then quarter derived from the completion date, for example Contracts / 2026 / Q3 under the archive root folder. Use List Folder Items to check whether the year folder and the quarter folder already exist, and Create Folder for whichever one is missing, so the same path is reused rather than duplicated.

Name each uploaded file with the envelope title plus the completion date in YYYY-MM-DD form so the archive stays searchable in Box, for example "Acme Corp MSA 2026-08-07.pdf" and "Acme Corp MSA 2026-08-07 signing certificate.pdf". Strip any characters Box does not accept in filenames from the title. If an envelope has more than one item, append the item name to keep the filenames distinct. If a file with that exact name is already in the folder, upload it with Upload New File Version instead of creating a duplicate, so a replayed webhook does not litter the archive.

Once the signed contract PDF is uploaded, call Add Shared Link to File on it and keep the resulting URL as the Box link for the register.

Append one row to our contract register in Google Sheets with Append Values, capturing the envelope title, the envelope id, every signer name, every signer email, the completion timestamp and the Box link. When there is more than one signer, list the names in one cell and the emails in another, comma separated, so the row stays a single line per contract.

Finally, confirm in Slack through the Slack Bot Send a Message operation so the operations channel can see the contract landed and got filed. The message should name the contract, list the signers, state when it completed, show the folder path it was filed into and link straight to the file in Box.

Every step here is fixed, so build this as a code workflow: known downloads, a known folder convention, a known register schema and a known confirmation message. No reasoning or judgement is required at any point.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery board