Route signed DocuSign contracts to HubSpot and Tabs

When a contract is signed in DocuSign, attach the PDF to the matching HubSpot deal, push it into Tabs for invoicing, and post a confirmation in Slack.

Agentic Task
DocusignHubSpotGoogle DriveTabsSlackSalesFinanceData SyncDocument ProcessingNotifications & Alerts

Build me an agent workflow that runs every time a DocuSign envelope transitions to completed (signed). The trigger should be a DocuSign poll for envelope_status_changed where the new status is completed.

For each completed envelope, the agent should:

1. Pull the envelope details from DocuSign and download the signed PDF (use Get Envelope, List Envelope Documents, then Download Document). Capture the counterparty/company name, signer email, envelope subject, and completed-at timestamp.

2. Save the signed PDF to a Google Drive folder I configure (e.g. /Signed Contracts/<Year>/<Counterparty>) so we have a stable archive link. Keep the existing folder layout if I already route signed contracts there.

3. Find the matching HubSpot deal. First try Search Deals by deal name and by associated contact email. If that's ambiguous, fall back to Search Companies on the counterparty name and look at that company's open deals. Prefer deals that are not yet closed-won and were updated recently. If nothing matches confidently, skip the HubSpot/Tabs steps and post a Slack message asking a human to pick the right deal.

4. Once the deal is identified, attach the signed contract using HubSpot's Create Note operation, associated to that deal. The note body should include the counterparty, signer email, completed-at timestamp, the DocuSign envelope ID, and the Google Drive link to the signed PDF. Do NOT change the deal stage in this workflow. Reps still mark Closed Won themselves; we just want the PDF attached before they do.

5. Push the contract into Tabs. Use List Customers (filtered by name or external ID = HubSpot company id) to find the customer. If the customer doesn't exist yet, Create Customer using the HubSpot company info. Then either find an existing draft contract via List Contracts or call Create Contract with the customer association, contract name (use the envelope subject or HubSpot deal name), and start/end dates pulled from the HubSpot deal properties or the envelope form fields. Finally call Upload Contract File on that contract with the signed PDF so Tabs has the executed document on file before invoicing kicks off.

6. Post a Slack message in #contracts-signed (make the channel configurable) summarizing what happened: counterparty, signer, HubSpot deal link, Google Drive file link, and Tabs contract link. If any step was skipped (no HubSpot match, Tabs customer missing, etc.), call that out clearly so someone can fix it.

Important guardrails:

- Dedupe on DocuSign envelope ID. If we've already processed this envelope, skip everything and don't repost in Slack.

- Never overwrite an existing Tabs contract file. If a contract already has a signed PDF attached and the envelope IDs differ, post a warning in Slack and stop instead of replacing it.

- Never invent a HubSpot deal match. If confidence is low, skip and ask in Slack. It's better to flag than to attach the contract to the wrong deal.

- Don't change the HubSpot deal stage. Reps own the close-won transition. We just make sure the executed PDF is on the deal before they flip it.

Additional information

What does this prompt do?
  • Watches DocuSign for completed envelopes and grabs the signed PDF as soon as a customer countersigns.
  • Finds the matching opportunity in HubSpot by counterparty name, signer email, or contract title, and files the signed PDF on the deal as a note with a Google Drive link.
  • Creates or updates the contract record in Tabs with the customer, dates, and signed PDF attached so invoicing can run on schedule.
  • Posts a short confirmation in Slack with links to the HubSpot deal, the Drive file, and the Tabs contract so reps and finance know the handoff is clean.
What do I need to use this?
  • A DocuSign account with permission to read completed envelopes and download signed documents.
  • A HubSpot login that can read deals and add notes to them.
  • A Google Drive folder where signed contracts already land (or one you want to use as the archive).
  • A Tabs workspace where contracts and customers live.
  • A Slack workspace with a channel for closed-won and contract handoffs.
How can I customize it?
  • Change which Slack channel the handoff message posts to, or send a DM to the deal owner instead.
  • Tighten the matching rules. For example, only match HubSpot deals in specific pipelines, or require both the company name and signer email to agree before attaching.
  • Decide whether the signed PDF goes in HubSpot as a note attachment, a Drive link, or both, and pick which Tabs fields (start date, end date, external IDs) get filled in from the envelope.

Frequently asked questions

What happens if no HubSpot deal matches the signed contract?
The workflow posts a flag in Slack with the signer details and a link to the PDF so a rep can manually pick the right deal. Nothing is force-attached to the wrong record.
Do reps have to do anything different in DocuSign or HubSpot?
No. Reps keep sending envelopes the way they always have. The workflow only runs once an envelope is fully signed, and it never asks the rep to fill in extra fields.
Will this work if Tabs only invoices on closed-won?
Yes. The workflow attaches the PDF to the HubSpot deal first so the contract is in place before close-won fires, then creates the Tabs contract so invoicing has everything it needs from day one.
Can I use Google Drive as the source instead of DocuSign?
DocuSign is the more reliable trigger because it tells us the envelope is completed and gives us the canonical signed PDF. The workflow can still mirror the file into your Drive folder for archival.
What if the same envelope gets signed twice or re-routed?
The agent dedupes by envelope ID before touching HubSpot or Tabs, so a re-send or re-route doesn't create a duplicate note, file, or contract.

Stop hand-carrying signed contracts between DocuSign, HubSpot, and Tabs.

Connect DocuSign, HubSpot, Google Drive, Tabs, and Slack once, and Geni files every signed contract end to end without rep busywork.