Dify Plugin for Web Pages and File Conversion#
The EnConvert plugin for Dify adds six tools to any agent or workflow: read a web page as markdown, search the web, list a site's URLs, extract structured fields, and convert an uploaded file to markdown or PDF. Every page render carries a render_quality score from 0.0 to 1.0, so a challenge page or an empty single-page-app shell arrives flagged instead of being reasoned over as real content.
enconvert · Source: enconvert/dify-enconvert · Minimum Dify: 1.0.0 · Licence: MIT
The six tools#
| Tool | Endpoint | What it does |
|---|---|---|
| Perceive URL | POST /v2/perceive |
Renders one page into markdown, cleaned HTML, raw HTML, a screenshot, a PDF, links, images or structured data, with a render_quality score. Built on Perceive. |
| Web Search | POST /v2/lookup |
Web, news, image, scholar, patent and map search, returning title, URL, snippet and position. Built on Lookup. |
| Discover URLs | POST /v2/discover |
Lists a site's URLs by sitemap, crawl or both, without rendering them. Built on Discover. |
| Extract Structured | POST /v2/distill |
Pulls named fields off one or many pages, or off a site it crawls for you. Built on Distill. |
| Convert File to Markdown | POST /v1/convert/anything-to-markdown |
Turns Word, PowerPoint, Excel, PDF, EPUB, RTF, HTML and text files into markdown. Built on Anything to Markdown. |
| Convert File to PDF | POST /v1/convert/anything-to-pdf |
Turns a document, spreadsheet, presentation, image, HTML or text file into a PDF. Built on Anything to PDF. |
Everything runs against the same REST API documented across this site, so your plan quota, rate limits and features apply exactly as they do everywhere else.
Install#
The plugin installs from its GitHub release while the Marketplace listing is in review.
- In Dify, open Plugins in the top-right corner.
- Click Install Plugin, then From GitHub.
- Paste the repository URL:
https://github.com/enconvert/dify-enconvert
- Select the version from the dropdown. Dify pulls the matching
.difypkgasset from that release. - Review the permissions, then click Install.
The plugin asks for the tool permission only, and declares outbound access to api.enconvert.com, www.enconvert.com and the storage host that serves converted files.
plugin verification has been enabled, and the plugin you want to install has a bad signature. The fix is in Troubleshooting. Dify Cloud is unaffected.
Add your API key#
The plugin takes one credential: EnConvert API Key.
- Generate a private API key in the dashboard. Private keys start with
sk_. - Open the EnConvert plugin, click To authorize, and paste the key.
- Save.
Saving calls GET /v1/whoami, which only accepts private keys, so a public pk_ key is rejected the moment you paste it rather than failing later inside a workflow run. The key travels as the header X-API-Key on every request the plugin makes.
pk_ are meant for browser widgets and are rejected by every tool in this plugin. Read more in Private Keys.
Reading a page#
Perceive URL takes the URL from the agent and two settings from the form:
| Parameter | Set by | Default | Purpose |
|---|---|---|---|
| URL | The agent | -- | The absolute URL to render |
| Outputs | The form | markdown,structured |
Any of markdown, html_cleaned, html_raw, screenshot, screenshot_full_page, pdf, links, images, structured, comma-separated |
| Only Main Content | The form | Off | Strip navigation, headers and footers, keeping the article |
The API returns each artifact as a signed URL that expires in 15 minutes, not as inline text, and an agent cannot open a URL. So the plugin reads the text artifacts for you: markdown, cleaned HTML and raw HTML are fetched and inlined into the tool result, up to 256 KB each. Anything larger, and anything binary, stays a link. The structured output is the exception, arriving inline at the top level of the response.
The render_quality score#
Every Perceive result carries render_quality, a number from 0.0 to 1.0. Zero means the page was blocked or empty; one means a clean render. The content still comes back either way, flagged, so a bad read never quietly enters a summary or a vector store.
Branch on it with an IF/ELSE node before the LLM node that consumes the markdown. In an agent the score sits in the tool result the model reads, so one sentence in the system prompt makes the model distrust a low one.
Extracting fields#
Extract Structured needs a schema and exactly one source. The schema is a JSON object in one of two shapes. A flat map of field name to plain-language description is the quick one:
{"title": "the page title", "price": "the monthly price in USD"}
A full JSON schema, {"type": "object", "properties": {...}}, is the other, worth the typing when you need types or nested objects enforced.
For the source, pass URLs, a comma-separated list capped at 50, or Discover From URL, a single site the API crawls for you, shaped by Discover Mode and Discover Max Pages. Passing both, or neither, returns a message saying so.
Results arrive as results[], one entry per URL, each with its own data and its own extraction_tier, which says whether a deterministic pass or a model reading the page produced the answer.
Converting files#
Convert File to Markdown and Convert File to PDF take a Dify file, not a URL. Wire in a file from a Start node's file input, or a file variable from an earlier node. The plugin uploads the bytes as multipart and returns a signed download URL for the result, valid for about 15 minutes and fetched with a plain GET and no API key.
The uploaded filename's extension decides the input format. Dify carries the original name through, so this is normally invisible, but a file arriving without a usable extension falls back to its own bytes: a PDF, an image or a DOCX is recovered from its signature, while a text format such as CSV or HTML has none and is rejected with a 400.
Building with it#
An agent that researches#
Give an agent Web Search, Perceive URL and Discover URLs. Search finds candidate pages, Perceive reads the promising ones as markdown, and Discover maps a site when the agent needs to know what else is on it without rendering anything.
A workflow that turns an upload into an answer#
Start (file input) -> Convert File to Markdown -> LLM -> Answer
Dify's own document extraction handles common formats. This path adds the ones it does not.
Troubleshooting#
plugin verification has been enabled, and the plugin you want to install has a bad signature.
A self-hosted Dify enforces signature verification on plugin packages by default, and only Marketplace packages carry a signature it recognises. Add FORCE_VERIFYING_SIGNATURE=false to docker/.env, then restart:
cd docker
docker compose down
docker compose up -d
That setting applies to every non-Marketplace plugin on the instance, so treat it as a decision about the instance rather than about one install. Dify Cloud is unaffected.
No versions appear in the install dialog.
Dify lists a release only when it has a .difypkg asset attached. Open the latest release and confirm the asset is there under Assets. An empty dropdown means no package, not the wrong one.
Saving the credential fails.
The key is wrong, or it is a public pk_ key. Generate a private key in the dashboard. Saving calls GET /v1/whoami, which accepts private keys only.
A tool reports the operation is not in my plan. Perceive, Web Search, Discover and Extract Structured draw from your plan's monthly ops allowance. Check your usage on the pricing page.
Perceive returns a link where markdown was expected. The markdown exceeded the 256 KB inline limit, so the plugin handed over the signed URL instead. Fetch it with a plain GET and no API key. Only Main Content usually brings a long page back under the limit.
A convert tool says it expected an uploaded file.
A URL string was wired into the File parameter. Both convert tools take a Dify file. To convert a web page, use Perceive URL with pdf or markdown under Outputs.
Source and links#
- Source: enconvert/dify-enconvert
- Latest release: releases/latest
- Licence: MIT
- Dify plugin documentation: docs.dify.ai
- Underlying API: Introduction
Frequently asked questions#
How do I install the EnConvert plugin in Dify?#
Open Plugins, click Install Plugin, then From GitHub, and paste https://github.com/enconvert/dify-enconvert. Pick the version from the dropdown, review the permissions, and click Install. Dify pulls the .difypkg asset straight from that GitHub release, which is a documented install path and needs no Marketplace listing.
Can I install it before the Marketplace listing is approved?#
Yes. Installing from a GitHub release is one of Dify's own publishing routes and takes about the same number of clicks as the Marketplace. The one difference is that a self-hosted instance with signature verification enabled refuses a non-Marketplace package until you set FORCE_VERIFYING_SIGNATURE=false in docker/.env.
How do I read a web page as markdown in a Dify agent?#
Add Perceive URL as a tool and leave Outputs at its default. The agent passes the URL, and the plugin returns the markdown inline in the tool result, up to 256 KB, so the model reads the page rather than a link it cannot open. Turn on Only Main Content to drop navigation and footers.
Why does Perceive give me a link instead of the text?#
Every artifact the API produces is a 15-minute signed URL. The plugin fetches the text ones and inlines them, up to 256 KB. A larger page, or a binary output such as a screenshot or PDF, stays a link, fetched with a plain GET and no API key.
How do I convert an uploaded DOCX to PDF in a Dify workflow?#
Add a file input to the Start node, then wire that file variable into Convert File to PDF. The tool uploads the bytes and returns a signed download URL for the PDF. The filename's extension decides the input format, so keep the original name.