Article · Oct 9, 2025

How to Merge PDFs in Bubble Without Timeouts Using n8n?

Discover how to handle large file operations outside Bubble using n8n automation. Merge, upload, and send PDFs back to Bubble, without hitting timeouts!

If you try merging PDFs directly in Bubble.io, you may run into timeout issues - many users report external API calls taking more than ~30 seconds simply fail.
To build a more scalable solution, I moved the heavy lifting to n8n, which doesn’t have Bubble’s runtime restrictions. In this article, I walk through the design, implementation, and security considerations of combining Bubble, n8n, and the I Love PDF APIs.

The same architectural pattern (Bubble triggers the workflow, n8n orchestrates the heavy work, result returns to Bubble) runs in production on the GoBD Verfahrensdokumentation case study — different external service (PDF Monkey for templated compliance documents) but the same orchestration shape and the same reason for the offload.


Bubble API Workflow Limits

  • Bubble’s workflows (especially when calling an external API) are subject to timeout constraints -many users encounter errors like Failed to establish a connection after 30000 ms or request timed out When the external call takes longer.

  • Some forum discussion suggests that Bubble has a 5-minute limit on entire workflow sequences, but the more immediate bottleneck is the ~30s external API call ceiling.

  • This means that merging multiple or large PDF files inside a Bubble workflow is inherently risky - you might hit failures when the backend process takes too long or the HTTP request to an API doesn’t respond fast enough.

Because of that, I decided to offload the process into a dedicated automation environment (n8n) so that Bubble just orchestrates inputs and gets the merged result back.


Bubble PDFs Merge using n8n Architecture

Here’s the improved design, refined with caveats:

Bubble → n8n (Webhook Trigger)

  • Bubble sends the list of PDF URLs + metadata to an n8n webhook (HTTP Request).

  • To avoid Bubble waiting indefinitely, the webhook should respond quickly (e.g. acknowledge receipt).

  • Later, n8n will call back Bubble with the merged file link.

n8n: PDF Download & I Love PDF Merge

  • Use n8n nodes (HTTP Request, Function, Loop) to download each PDF file.

  • Use I Love PDF Merge API (start merge task → upload each file → execute merge).

  • Store credentials (I Love PDF API key) securely in n8n’s credentials system, not in nodes.

n8n: Upload Merged PDF to Bubble File Manager

  • Use Bubble’s /fileupload endpoint to push the merged file.

  • Security warning: Bubble’s file upload API endpoint can be abused if left open. Many in the Bubble community call this a vulnerability.

  • To protect this, ensure only your backend (n8n) can call it (e.g., with a secret header, IP whitelisting, or checking an authorization token).

n8n → Bubble: Callback / Workflow Trigger

  • After upload, n8n calls a Bubble API endpoint (e.g. a backend workflow) passing the file URL or file ID.

  • Bubble updates its database and triggers subsequent workflows (e.g. emailing the PDF).

Error Handling / Retries

  • If any PDF upload or merge step fails, n8n can retry.

  • You can notify the admin or fallback logic inside n8n if something goes wrong.


Why This Bubble + n8n Solution Works Better?

  • No Bubble timeouts on heavy processing - n8n can run as long as needed without the same constraints.

  • Separation of concerns - Bubble remains the UI and data orchestrator; heavy file processing is handled elsewhere.

  • Credential safety - API keys remain in n8n’s credential store, not exposed in visuals.

  • Better error control - n8n supports structured retry logic, branching, error-handling, logging etc.

However, you need to be cautious about:

  • Ensuring the initial webhook from Bubble doesn’t block (i.e., respond quickly, don’t wait for the full merge).

  • Securing Bubble’s file upload endpoint so that malicious actors can’t upload arbitrary files.

  • Handling edge cases (network failures, large file sizes, etc.) robustly.


Security & Best Practices

  • Always use n8n’s credential store (not embedding secrets in nodes). n8n’s docs specify credentials are separate and private.

  • For your Bubble file upload endpoint:

    • Avoid leaving it wide open. Many community posts state that the /fileupload endpoint can be triggered without authentication in some setups.

    • Use headers or tokens to limit who can upload.

  • For Bubble → n8n webhook:

    • Validate incoming requests (signature, token) to prevent unwanted triggers.

    • Return a fast ACK, then process asynchronously.

  • Ensure your callback from n8n → Bubble is also authenticated/validated.


n8n template for PDF Merger

Here is the logic structure:

Bubble frontend → HTTP POST to n8n webhook (pdfUrls, metadata)

n8n: Webhook receives → immediately respond 200 OK (maybe return a job ID)

n8n: Process flow
    • Authenticate with I Love PDF (using secure credential)
    • Start merge task
    • For each URL: download and upload to merge task
    • Execute merge → get merged PDF URL
    • Download merged PDF
    • Upload to Bubble fileupload endpoint (with authorization)

n8n → HTTP POST back to Bubble backend workflow endpoint: pass merged file URL & job ID

Bubble backend workflow: update DB, trigger email or next step

Here is the template to import: Click here to request access.

Frequently asked questions

Why does merging large PDFs time out in Bubble.io backend workflows?

Bubble.io backend workflows are capped at 5 minutes of execution time, and PDF merge operations on documents with many pages (or many small files) regularly exceed that cap because they hold each source PDF in memory while concatenating. The cap is hard; there is no way to extend it from within Bubble.

Why offload PDF merge to n8n instead of another service?

n8n exposes PDF nodes that handle merge, split, and watermark out of the box, runs the merge in a fresh execution context per webhook call (no shared Bubble workload-unit budget), and self-hosts cheaply on a $5/month VPS if cost matters. The webhook handoff is two HTTP calls; the architecture stays simple.

How does Bubble.io send the PDF URLs to n8n?

Bubble POSTs a JSON body containing the list of source PDF URLs (each is a Bubble S3 link) to an n8n webhook URL configured as the workflow trigger. n8n downloads each PDF, merges via the PDF Merge node, then PUTs the result back to a pre-signed Bubble S3 URL. The Bubble workflow polls a status field or relies on a callback webhook to mark the merge complete.

What happens if the n8n merge job fails partway through?

Make the n8n workflow idempotent so the Bubble side can safely retry the same payload. Store the source URL set + a content fingerprint as the natural key; if n8n sees a repeat fingerprint and the result is already in S3, skip the merge and return the cached URL. The dispatcher pattern in the post covers the full retry envelope.