Official plugin in the Dify Marketplace

Dify integration

Convert, merge, compress and OCR files inside your Dify workflows, chatflows and agents. Install the ConvertAPI plugin from the Dify Marketplace and connect it with an API token.

Dify is an open-source platform for building AI apps, workflows and agents. The ConvertAPI plugin adds seven file tools to it. Each tool takes Dify files as input and returns the converted files as Dify files, so the result can go straight to the next node, to an LLM or to the user as a download.

What the plugin can do

ToolWhat it does
Convert FileAny format pair ConvertAPI supports, for example DOCX to PDF, PDF to JPG, HTML to DOCX, XLSX to CSV or PPTX to PNG. Set the output format as a file extension.
Office / HTML to PDFWord, Excel, PowerPoint, OpenDocument, RTF, TXT, Markdown or HTML to PDF, with optional PDF/A for archiving.
PDF to WordPDF to editable DOCX. Scanned pages are recognized with OCR. Optional page range and password.
PDF to ExcelThe tables of a PDF in an XLSX workbook, one sheet per page or all on one sheet.
Merge PDFTwo or more PDFs combined into one, in the order given, with an optional bookmark for each file.
Compress PDFA smaller PDF, up to 90% smaller, with presets from lossless to smallest.
OCR PDFA scanned PDF made searchable in 27 languages, or its text extracted as a TXT file.

Every tool also has an Extra parameters (JSON) field for any other ConvertAPI parameter, for example {"PageRange": "1-3"}. Each converter's parameters are listed in the API reference.

How to set it up

  1. Sign up for a free ConvertAPI account and copy an API token from the Authentication page.
  2. In Dify, open Plugins, find ConvertAPI in the Marketplace and install it.
  3. Click Authorize and paste the token. Optionally pick a processing region (EU, UK, US, Canada, Asia or Australia) to keep your files in that region. By default, each request goes to the nearest data center.
  4. Add a ConvertAPI tool to a workflow, chatflow or agent and give it a file, for example the files a user uploads in chat (sys.files) or a file input on the Start node.

Examples

  • Contract intake: a user uploads a DOCX in chat, and Office / HTML to PDF turns it into a PDF to store or send.
  • Invoice extraction: PDF to Excel pulls the tables out of uploaded invoices, and a Code node reads the rows.
  • Scanned archives for an LLM: OCR PDF with TXT output gives an LLM node text it can read.
  • Agent tool: give an agent Convert File, and it can turn any uploaded file into the format the user asks for.

Self-hosted Dify

The plugin reads input files from the Dify API, so the plugin daemon must be able to reach it. With Docker Compose, set INTERNAL_FILES_URL=http://api:5001 in docker/.env and restart Dify. The plugin also needs outbound HTTPS to v2.convertapi.com, or to the regional host you pick.

Your files

The plugin sends your files with the conversion request and asks for the results in the response, so ConvertAPI does not store your input or output files. Conversions that run into an error fail the Dify node with a short message, so Dify's error handling, such as a fail branch or a retry, applies. Your API token never appears in messages or logs.

Pricing and support

Each conversion uses conversions from your ConvertAPI plan; see pricing. The plugin is open source under the MIT license: the code is at github.com/ConvertAPI/convertapi-dify. For help, email support@convertapi.com or open an issue on GitHub.

Ready to Streamline Your File Conversions?

Automate Your Daily Document Management Tasks

Beyond Dify, ConvertAPI covers the rest of your document work: converting, merging, splitting, compressing, protecting and extracting data from files, with REST, SDKs and no-code tools.

Businesses trust us

Highest rated File Conversion API on major B2B software listing platforms: Capterra, G2, and Trustpilot.

"ConvertAPI has been a game-changer for our document automation workflows. Their conversion accuracy and API reliability are unmatched in the industry for over 7 years."

"ConvertAPI is a reliable, cost-effective solution with a proven track record of stability. It has grown significantly in maturity, adopting enterprise-grade practices over the years."

"We've integrated ConvertAPI across our entire document processing platform. The performance is exceptional and the support team is always responsive. Highly recommended!"

Enterprise-Grade Security

We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.

Learn more about security

Ready to Streamline Your File Conversions?