Blog

How to Integrate DocuSign with Bubble

Sep 20, 2025

Calculating...

Calculating...

Harish Malhi - founder of Goodspeed

Founder of Goodspeed

How to Integrate DocuSign with Bubble – Goodspeed Studio blog

Learn how to integrate DocuSign with Bubble to send contracts for e-signature, track document status, and automate signing workflows in your no-code app.

Learn how to integrate DocuSign with Bubble to send contracts for e-signature, track document status, and automate signing workflows in your no-code app.

What DocuSign Integration Does in a Bubble App

DocuSign is the industry standard for electronic signatures. When you integrate it with Bubble, your app can generate contracts, send them to signers, track whether they've been signed, and store the completed documents — all without users leaving your product or downloading PDFs to sign manually. The entire signing workflow happens programmatically through DocuSign's API.

This matters for any Bubble app that involves agreements: SaaS terms of service, marketplace contracts between buyers and sellers, consulting agreements, rental applications, employment offers, NDAs, or any document that needs a legally binding signature. DocuSign provides the legal validity and audit trail. Bubble provides the business logic and user interface around it.

Use Cases Worth Building

The first use case is a contract management workflow. Your Bubble app generates a contract based on user inputs (pricing, terms, parties), sends it through DocuSign for signature, and tracks the status. When all parties sign, the completed document is stored in your Bubble database and the relevant records are updated. This works for consulting platforms, freelance marketplaces, and service booking apps.

The second use case is onboarding workflows. New customers or employees need to sign multiple documents — terms of service, privacy policies, NDAs, W-9 forms. Your Bubble app orchestrates the sequence: generate the documents with pre-filled data, send them via DocuSign, track completion, and gate access to the next step until all documents are signed.

The third use case is real estate and legal tech. Applications that handle property leases, purchase agreements, or legal retainers need e-signatures with strong legal standing. DocuSign provides the compliance framework (ESIGN Act, UETA, eIDAS) and audit trail that satisfy legal requirements. Your Bubble app handles the property listings, client management, and document generation.

Setting Up DocuSign with Bubble

DocuSign's integration uses OAuth 2.0 for authentication and their eSignature REST API for document operations. Start by creating a DocuSign developer account at developers.docusign.com. This gives you a sandbox environment for testing. Create an "Integration Key" (application) in the DocuSign admin console — this is your OAuth client ID.

DocuSign supports two OAuth flows: Authorization Code Grant (for apps acting on behalf of a user) and JWT Grant (for server-to-server authentication without user interaction). For most Bubble apps, JWT Grant is simpler because it doesn't require user-facing OAuth redirects. You generate a JWT using your integration key and a RSA private key, exchange it for an access token, and use that token for API calls.

The challenge with JWT Grant in Bubble is that Bubble can't natively sign JWTs with RSA keys. You have two options. First, use a middleware — a small cloud function (AWS Lambda, Google Cloud Function) that handles the JWT signing and returns a DocuSign access token to your Bubble app. Second, use a Bubble plugin that supports JWT generation or use the Toolbox plugin's server-side action with Node.js code to sign the JWT.

Once you have an access token, set up the API Connector in Bubble. Create an API called "DocuSign" with the base URL from your DocuSign account (the base URI returned during authentication, typically https://demo.docusign.net/restapi for sandbox). Add the access token as a Bearer token in the Authorization header.

Sending a Document for Signature

The core DocuSign operation is creating an "envelope" — DocuSign's term for a package of documents sent to one or more signers. You create an envelope through a POST to /v2.1/accounts/{accountId}/envelopes.

The envelope request body includes the documents (as base64-encoded files or template references), the recipients (signers with their names, email addresses, and signing order), the signature tab placements (where on the document each signer should sign), and the envelope status (set to "sent" to deliver immediately or "created" to save as a draft).

For Bubble, the most practical approach is using DocuSign templates. Create your contract templates in DocuSign's web interface with pre-placed signature tabs and text fields. Then from Bubble, reference the template ID and pass the recipient information and any pre-fill data. This avoids the complexity of sending raw documents and defining tab positions through the API.

Create a Bubble backend workflow that calls the envelope creation endpoint. Pass the template ID, signer name and email (from your Bubble database), and any template role values. DocuSign sends the signing email automatically. Store the returned envelope ID in your Bubble database linked to the relevant record (the contract, the customer, the deal).

Tracking Envelope Status

After sending an envelope, you need to know when it's been signed. DocuSign provides two ways to track status: polling the API and webhooks (DocuSign Connect).

For polling, create an API Connector call that GETs /v2.1/accounts/{accountId}/envelopes/{envelopeId}. The response includes the envelope status (sent, delivered, completed, declined, voided) and each recipient's individual status. Schedule a recurring Bubble workflow that checks the status of pending envelopes periodically — every hour or every few hours.

For real-time updates, configure DocuSign Connect to send webhooks to a Bubble Backend Workflow API endpoint. In DocuSign's admin console, create a Connect configuration with your Bubble webhook URL and select which events to receive (Envelope Sent, Envelope Delivered, Envelope Completed, Envelope Declined). When the status changes, DocuSign posts the update to your Bubble app, which updates the envelope record in the database and triggers any follow-up workflows.

The webhook approach is better for user experience — you can display real-time signing status in your Bubble app — but requires reliable webhook handling. The polling approach is simpler but adds latency between the actual signing and your app knowing about it.

Embedded Signing

Instead of sending the signer an email with a link to DocuSign, you can embed the signing experience directly in your Bubble app. This is called "embedded signing" or "recipient view." The signer never leaves your Bubble app — they see the document and sign it in an iframe or redirect within your page.

To implement embedded signing, create the envelope with the recipient's clientUserId property set (this marks them as an embedded signer). Then call the POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient endpoint to get a signing URL. Display this URL in an iframe element in your Bubble page or redirect the user to it.

The signing URL expires after a short period (default five minutes), so generate it on-demand when the user is ready to sign. When signing is complete, DocuSign redirects the user back to a URL you specify, where your Bubble app can update the signing status and proceed with the next workflow step.

Common Pitfalls

Authentication is the biggest hurdle. DocuSign's OAuth and JWT flow is more complex than most APIs. If you're spending days on authentication alone, consider using a middleware service or hiring someone who's implemented DocuSign's OAuth before. Once authentication works, the API calls themselves are straightforward.

Template management is another pain point. If your contracts change frequently, maintaining DocuSign templates in sync with your Bubble app's data model requires discipline. When you add a new field to your Bubble database that should appear on contracts, you need to update the DocuSign template and the API call that populates it.

Sandbox vs production differences catch people off guard. DocuSign's sandbox and production environments have different base URLs, different account IDs, and require separate OAuth consents. When you go live, you need to submit your integration for review through DocuSign's Go-Live process, which involves a checklist of security and functionality requirements.

Error handling for failed deliveries is often overlooked. If a signer's email bounces, DocuSign marks the envelope as failed. Your Bubble app needs to detect this status and notify the sender so they can update the email address and resend. Without proper error handling, envelopes silently fail and nobody notices until someone asks why the contract hasn't been signed.

DIY vs Hiring a Bubble Developer

DocuSign integration is one of the more complex API integrations for Bubble because of the JWT authentication requirement and the multi-step envelope workflow. If you're using DocuSign templates and only need basic send-and-track functionality, expect one to two weeks for a first-time implementation. Embedded signing and webhook handling add another week.

For products where contract signing is a core workflow — legal tech, HR tech, real estate platforms — getting the DocuSign integration right is critical to your user experience. An experienced developer can implement the full flow (authentication, template-based sending, embedded signing, webhook status tracking, and completed document storage) in about a week. That's usually worth the investment compared to debugging JWT authentication and webhook reliability on your own.

Add E-Signatures to Your Bubble Product

Related guides:

  • how to build a hr tool with Bubble

  • how to build a invoicing system with Bubble

  • Bubble plaid integration guide

DocuSign integration gives your Bubble app legally binding e-signature capabilities that users trust. Whether you're sending contracts, onboarding documents, or compliance forms, DocuSign handles the signing and legal framework while Bubble handles the business logic. Talk to our team at Goodspeed Studio about adding e-signatures to your Bubble application.

DocuSign Makes Your Bubble App Legally Binding

DocuSign integration adds professional e-signature capabilities to your Bubble app. Use templates for easier document management, webhooks for real-time status updates, and embedded signing for a seamless in-app experience. The JWT authentication setup is the biggest hurdle — once that works, the rest is standard API integration. Talk to our Bubble developers.

Harish Malhi - founder of Goodspeed

Harish Malhi

Founder of Goodspeed

Harish Malhi is the founder of Goodspeed, one of the top-rated Bubble agencies globally and winner of Bubble’s Agency of the Year award in 2024. He left Google to launch his first app, Diaspo, built entirely on Bubble, which gained press coverage from the BBC, ITV and more. Since then, he has helped ship over 200 products using Bubble, Framer, n8n and more - from internal tools to full-scale SaaS platforms. Harish now leads a team that helps founders and operators replace clunky workflows with fast, flexible software without writing a line of code.

Frequently Asked Questions (FAQs)

Can I use DocuSign's free plan with Bubble?

DocuSign's developer sandbox is free for testing and development with full API access. For production, DocuSign's plans start at $10 per month for individual use. API access for integrations typically requires a Standard or Business Pro plan. Check DocuSign's current pricing for API-enabled plans.

Do I need templates in DocuSign for Bubble integration?

Not strictly, but they're strongly recommended. Templates let you pre-define signature placements, form fields, and document layout in DocuSign's visual editor. Your Bubble app then references the template and fills in recipient-specific data. Without templates, you'd need to define tab positions programmatically, which is tedious and error-prone.

Can signers sign documents without leaving my Bubble app?

Yes, using embedded signing. Create the envelope with a clientUserId for the signer, then generate a signing URL through DocuSign's recipient view API. Display this URL in an iframe or redirect within your Bubble page. The signer completes the signature without ever seeing DocuSign's email or website.

How do I know when a document has been signed in Bubble?

Two options. Poll DocuSign's API periodically by checking the envelope status through a scheduled Bubble workflow. Or set up DocuSign Connect webhooks that POST status updates to a Bubble Backend Workflow API endpoint in real time. Webhooks provide faster updates but require more setup.

Is DocuSign integration secure in Bubble?

Yes, when implemented correctly. Keep your DocuSign API credentials and RSA private key server-side in backend workflows. Never expose them in front-end elements. DocuSign handles document encryption, audit trails, and compliance with e-signature laws. Your Bubble app only interacts with DocuSign through authenticated API calls.

How long does DocuSign integration take in Bubble?

Basic send-and-track functionality takes one to two weeks for a first-time builder. Adding embedded signing, webhook status tracking, and completed document retrieval extends this to two to three weeks. An experienced Bubble developer can ship the full integration in about a week.

The smartest AI builds, in your inbox

Every week, you'll get first hand insights of building with no code and AI so you get a competitive advantage