DocRaptor
The best and easiest HTML-to-PDF API
Verdict
Common use cases
- Generate client invoices from chat threads
- Export sprint reports as formatted PDFs
- Turn data tables into Excel downloads
- Create contracts from template HTML
- Archive meeting notes as print-ready documents
Integration
- Vendor
- DocRaptor
- Category
- developer-tools
- Auth
- API_KEY
- Tools
- 10
- Composio slug
docraptor
Tools
- Create Async Document
Tool to create documents asynchronously from HTML content. Use when generating PDF, XLS, or XLSX documents and you need to poll for completion status or use a callback URL for notification.
- Create Document
Tool to create a PDF or Excel document synchronously from HTML content or URL. Use when you need to generate a document file from HTML data. The document is returned immediately as a downloadable file. Either document_content or document_ur
- Create Document from Referrer
Tool to convert webpages into documents using referrer-based authentication without an API key. Use when you need to generate PDFs or Excel files from registered domains without explicit API credentials.
- Create Hosted Async Document
Tool to create a hosted document asynchronously. Use when you need to generate a PDF, XLS, or XLSX document and track its completion status via callback_url or the status API.
- Download Async Document
Tool to download a completed asynchronous document using the download URL from status response. Use when you have a download_id and need to retrieve the generated document file.
- Get Async Document Status
Tool to check the status of an asynchronously created document. Use when monitoring progress of async documents by polling for completion status.
- List Documents (JSON)
Tool to retrieve a paginated list of previously created documents with metadata in JSON format. Use when you need to see document creation history or query past documents.
- List Documents (XML)
Tool to retrieve a paginated list of previously created documents with metadata in XML format. Use when you need to see document creation history or query past documents in XML format.
- List IPs (JSON)
Tool to get list of IP addresses that DocRaptor uses to download assets. Use when you need to know which IPs DocRaptor uses for asset downloading. Note: Using IPs for securing assets is not recommended as they can change without notice.
- List IPs (Text)
Tool to retrieve a list of IP addresses that DocRaptor uses to download assets in plain text format. Use when you need to identify DocRaptor's IP addresses for network configuration or security purposes.
Setup
Setup guide
- 11. In Switchy, open Settings > Integrations and search for DocRaptor. 2. Click Connect and paste your DocRaptor API key (find it at docraptor.com/documentation under API Credentials). 3. Save the connection — Switchy confirms the key is valid. 4. Open any Space and type '@DocRaptor' to see available tools. 5. Test with a simple prompt: '@DocRaptor create a PDF from this HTML: <h1>Test</h1><p>Hello world</p>' — you should get a download link in seconds. 6. For larger documents or Excel output, use the async workflow: '@DocRaptor create an async PDF from [your HTML]' then '@DocRaptor check status for [download_id]' until complete. 7. If you're converting live URLs, ensure the page is publicly accessible or use referrer-based auth for registered domains.
What teammates see: by default, memories from DocRaptor are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Invoice from HTML
@DocRaptor create a PDF from this HTML invoice template: [paste your HTML here with line items, totals, and company header]. Use letter size and portrait orientation.Open in a Space →
Weekly Report Export
@DocRaptor generate a PDF report from this HTML: <h1>Week of [date]</h1><h2>Completed</h2><ul>[list items]</ul><h2>In Progress</h2><ul>[list items]</ul>. Make it landscape on A4.Open in a Space →
Data Table to Excel
@DocRaptor create an Excel file from this HTML table: [paste table markup with headers and rows]. I need it as XLSX format.Open in a Space →
URL to PDF Archive
@DocRaptor convert this URL to a PDF: [paste URL]. Use the default settings and return the download link when ready.Open in a Space →
Async Large Document
@DocRaptor create an async PDF from this 50-page HTML document: [paste or link to content]. Let me know the download_id so I can check status.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@DocRaptor list the last 10 documents we've generated this month and show me which ones were PDFs vs spreadsheets
Based on your account history, here are the 10 most recent documents created in the past 30 days: **PDFs (7):** - Invoice_2024_Q1.pdf (created Jan 15, 2.3 MB) - Product_Catalog_v3.pdf (created Jan 12, 8.1 MB) - Contract_Amendment_A.pdf (created Jan 10, 1.4 MB) - Marketing_Report.pdf (created Jan 8, 5.6 MB) - Employee_Handbook.pdf (created Jan 5, 12.3 MB) - Sales_Deck_Final.pdf (created Jan 3, 4.2 MB) - Terms_of_Service.pdf (created Jan 2, 890 KB) **Spreadsheets (3):** - Revenue_Analysis_Q4.xlsx (created Jan 14, 245 KB) - Customer_List_Export.xls (created Jan 9, 1.1 MB) - Inventory_Report.xlsx (created Jan 4, 678 KB) This is an illustrative example showing typical document metadata returned from the List Documents API.
This example demonstrates DocRaptor's document history tracking. The List Documents tool requires valid API key authentication and returns paginated results (default 100 per page). Useful for auditing document generation patterns, but note that document storage retention policies vary by account tier—older documents may no longer be accessible for download.
@DocRaptor convert this HTML invoice template into a PDF with our company letterhead and send me the download link
I've successfully generated your PDF invoice using DocRaptor's synchronous document creation: **Document Created:** - Format: PDF - Size: 1.8 MB - Processing time: 3.2 seconds - Download URL: [docraptor-download-link-12345] The PDF includes your HTML template rendered with the company letterhead, proper page breaks, and print-optimized formatting. The document is ready for download and will remain accessible for 24 hours. This is an illustrative example—actual generation time and file size depend on your HTML complexity and embedded assets.
This showcases DocRaptor's core synchronous PDF generation from HTML. The Create Document tool blocks until rendering completes (typically 2-10 seconds), making it ideal for immediate-use documents under 5 MB. For larger documents or batch operations, use the async workflow instead. Requires API key authentication and consumes one document credit per generation.
@DocRaptor generate Excel spreadsheets from our last 5 customer order confirmations and summarize the total revenue across all orders
I've created 5 Excel spreadsheets from your order confirmation HTML and analyzed the revenue data: **Generated Spreadsheets:** 1. Order_10234_Acme_Corp.xlsx (12 line items, $8,450) 2. Order_10235_TechStart_Inc.xlsx (8 line items, $3,200) 3. Order_10236_Global_Solutions.xlsx (15 line items, $12,750) 4. Order_10237_Innovate_LLC.xlsx (6 line items, $2,100) 5. Order_10238_Enterprise_Co.xlsx (22 line items, $18,900) **Revenue Summary:** Total across 5 orders: $45,400 Average order value: $9,080 Largest order: $18,900 (Enterprise_Co) All spreadsheets are formatted with your standard order template and include itemized pricing, tax calculations, and payment terms. This illustrative example shows how DocRaptor's XLS/XLSX generation pairs with AI analysis.
This example combines DocRaptor's Excel generation capability with AI reasoning to extract business insights. The Create Document tool supports both XLS and XLSX formats from HTML tables. Each spreadsheet generation counts as one API call and document credit. Be mindful of rate limits when processing batches—consider the async workflow for 10+ documents to avoid timeout issues.
Use-case deep-dives
When DocRaptor beats manual PDF exports for deal velocity
A 6-person sales team closes 40-60 deals monthly, each needing a custom contract PDF with pricing tables and legal clauses pulled from Salesforce. DocRaptor's synchronous Create Document tool wins here because it converts HTML templates to PDFs in under 3 seconds—fast enough to generate contracts during live calls. The async tools matter less at this volume; you'd use Create Async Document only if batching 200+ contracts overnight. The API key auth is simple enough for a junior dev to wire into your CRM in an afternoon. If your contracts need e-signatures immediately after generation, DocRaptor pairs cleanly with DocuSign's API. This setup cuts contract turnaround from 2 hours to 2 minutes, which directly shortens your sales cycle.
How async document creation handles scheduled bulk exports
A 3-person finance team sends 120 custom P&L reports to franchise owners on the first of each month, each with unique data tables and charts rendered from accounting software. DocRaptor's Create Hosted Async Document tool is the right call because it queues all 120 jobs, returns status URLs, and lets you poll completion without blocking your script. The hosted output means recipients get direct download links instead of email attachments. If your reports are under 20 pages and your HTML templates are clean, expect 90-second average generation time per document. The List Documents tools help you audit which reports failed or need regeneration. This approach breaks down if reports exceed 100 pages or include complex CSS—DocRaptor's rendering engine struggles with nested flexbox layouts over 50 elements deep.
When referrer-based auth simplifies one-off PDF snapshots
A 4-person support team needs to archive resolved tickets as PDFs for compliance audits, generating 15-25 exports weekly from their Zendesk instance. DocRaptor's Create Document from Referrer tool works if your ticketing system already renders HTML views at stable URLs—you register your domain once, then call the endpoint without managing API keys in your support workflow. This matters for non-technical support leads who trigger exports manually. The trade-off: referrer auth only works for public or session-authenticated URLs, so if your tickets are behind OAuth or VPN, you'll need the standard API key flow instead. At this volume, synchronous creation is fine; you'd only switch to async if exporting 100+ tickets in a single batch. This setup takes 20 minutes to configure and eliminates the 'email me a PDF' Slack requests.
Frequently asked
What does the DocRaptor MCP do in Switchy?
It converts HTML content or URLs into PDF and Excel files directly from your Switchy workspace. You can generate documents synchronously for immediate download or asynchronously for larger files that need background processing. The MCP handles both one-off conversions and batch document generation, returning downloadable files your team can use in workflows or share with clients.
Do I need a DocRaptor account to use this MCP?
Yes. You need an active DocRaptor account and an API key. Paste the key into Switchy's connection flow and the MCP authenticates all requests through it. DocRaptor bills separately based on your document generation volume — Switchy doesn't include DocRaptor credits. If your domain is registered with DocRaptor, you can also use referrer-based auth for certain tools without exposing the key.
Can the MCP convert complex HTML with CSS and JavaScript?
Yes, but with limits. DocRaptor renders HTML using a headless browser, so CSS layouts and web fonts work. JavaScript execution is supported but timing can be tricky for async-loaded content — you may need to structure your HTML to avoid race conditions. The MCP itself doesn't validate your HTML; it passes it to DocRaptor's API, which returns errors if rendering fails.
Why use this instead of calling DocRaptor's API directly?
The MCP wraps DocRaptor's API in Switchy's shared context, so your team's AI agents can generate documents mid-conversation without writing code. If you're already scripting DocRaptor calls in Python or Node, keep doing that. Use the MCP when you want non-technical teammates to trigger PDF generation from Slack threads or project briefs without touching a terminal.
Who on the team should connect the DocRaptor MCP?
Whoever holds your DocRaptor API key and understands your document generation workflow. Typically a developer or ops lead. Once connected, any Switchy workspace member can ask an agent to generate a PDF, but the API key owner is responsible for usage costs and rate limits. Review DocRaptor's billing dashboard regularly if multiple people are triggering document jobs.