Skip to content
whoistyping.wtf

Save collaborative Tiptap documents to Bubble with webhooks

Last updated 22 November 2026. Verified against the WhoIsTyping webhook delivery contract and Content API.

Short answer

When multiple people edit a Tiptap document simultaneously, saving directly from each browser tab via Bubble autobinding creates overwrites and unnecessary workload unit (WU) spikes. Instead, let the collaboration server merge edits with Yjs and push the latest rendered HTML and Tiptap JSON straight to a Bubble backend workflow via a document webhook — included on every WhoIsTyping plan, including Free (1 project, 5 documents and 5 concurrent connections).

Bubble-compatible webhook payload

Configure your endpoint URL under Project → Webhooks and keep the default bubble_compatible format. Intermediate edits are coalesced so Bubble receives the newest snapshot rather than a call per keystroke:

{
  "event": "document.updated",
  "document_name": "contract-4821",
  "project_id": "proj-uuid",
  "document_server_id": "srv-uuid",
  "clients_count": 2,
  "document": {
    "default": {
      "type": "doc",
      "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Hi" }] }]
    }
  },
  "html": {
    "default": "<p>Hi</p>"
  }
}

In your Bubble backend workflow, match your database record using document_name and save html.default (and optionally document.default) idempotently. Because delivery is at-least-once with up to 20 retries on transport errors, 408, 425, 429 or 5xx responses, overwriting the stored field by document_name keeps duplicate deliveries harmless.

Authenticating Bubble backend workflows

Bubble validates any Authorization: Bearer header before routing a backend workflow — even if "can be run without authentication" is checked — and rejects non-Bubble tokens with 401 Invalid or expired token. WhoIsTyping gives you two clean options:

  • Bubble API token (default, recommended): generate an API token in Bubble under Settings → API → API tokens and paste it into your WhoIsTyping project after saving your endpoint URL. WhoIsTyping encrypts it at rest (write-only) and sends Authorization: Bearer <Bubble API token>. Your workflow requires no manual header checks.
  • Shared secret header: WhoIsTyping sends X-Webhook-Secret: <Webhook Secret> with no Authorization header. In Bubble, enable This workflow can be run without authentication and Include headers in the request data, then add a first step that terminates the workflow if the header does not match your Webhook Secret.

Click Verify receiver on the project page to send a synthetic test-document snapshot and confirm your Bubble workflow returns HTTP 200.

Webhook HTML presets and security

WhoIsTyping renders html on the collaboration server using the preset you select:

  • bubble_plugin (default): matches the released Rich text editor (Tiptap.dev) Bubble plugin extensions so rendered HTML matches what your Bubble users see.
  • standard: StarterKit plus open-source extensions (tables, task lists, images, alignment, text style, highlight, subscript, superscript, YouTube, mentions, details).
  • off: sends Tiptap JSON only, omitting the html key.

Important: rendered HTML is capped at 1 MiB across fragments and is not sanitized — collaborators can write preserved attributes/classes, so sanitize HTML before rendering it outside the editor.

Hocuspocus-compatible format (non-Bubble backends)

If your backend is Phoenix, Node, Rails or Python instead of Bubble, switch the project webhook format to hocuspocus_compatible. Deliveries use event: "change" with payload.documentName, payload.document and payload.html, signed with X-Hocuspocus-Signature-256: sha256=<hex> (HMAC-SHA256 over the raw request body bytes using your Webhook Secret).

Reading and writing live docs via the Content API

Need to pull a document on demand or push HTML from a Bubble workflow into an open collaborative editor? Create a Content API Secret on your project and call the Tiptap Cloud-compatible REST endpoint:

# Read live HTML (includes unsaved edits if users are connected)
curl -H "Authorization: Bearer $CONTENT_API_SECRET" \
  "https://whoistyping.wtf/api/v1/document-servers/$DOC_SERVER_ID/documents/contract-4821?format=html"

# Update or create a live document from HTML (connected editors update instantly)
curl -X PATCH \
  -H "Authorization: Bearer $CONTENT_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"html":"<p>Updated from Bubble workflow</p>"}' \
  "https://whoistyping.wtf/api/v1/document-servers/$DOC_SERVER_ID/documents/contract-4821?format=html&upsert=1"

Staying well under your document limit

Once your Bubble database holds the saved HTML copy, you do not have to keep idle collaboration documents forever. Delete old collaboration rooms via DELETE /api/v1/documents/{id} (or enable automatic removal of the oldest idle document in project settings). The saved copy stays in Bubble while your active WhoIsTyping count stays low.

Need to set up the Bubble editor first? Read the Bubble collaboration setup guide, or explore editing live Tiptap documents from AI agents via MCP.