Langflow Bundle for Web Rendering and File Conversion#

The EnConvert bundle for Langflow adds six components to any workflow: perceive a web page as markdown or structured data, search the web, discover a site's URLs, extract fields from a page against a schema, and convert uploaded files to markdown or PDF. Every page render carries a render_quality score from 0.0 to 1.0, so a blocked or empty single-page-app shell arrives flagged instead of being reasoned over as real content.

Package: lfx-enconvert · Source: enconvert/langflow-enconvert · Licence: MIT

The six components#

Component 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#

pip install lfx-enconvert

Langflow auto-discovers the bundle at server start. The six components appear under the EnConvert bundle in the component sidebar — no config, no manual registration required.

For local development or testing without pip install, copy the components folder to your Langflow instance via the LANGFLOW_COMPONENTS_PATH environment variable. See the deploy guide for details.


Add your API key#

Each of the six components has an EnConvert API Key field.

  1. Generate a private API key in the dashboard. Private keys start with sk_.
  2. In Langflow, create a global variable for the key (so it never lives in the flow JSON):
  3. Go to Settings > Global Variables and add a new variable named enconvert_key with your private key.
  4. In each component you add to the flow, select that global variable in the EnConvert API Key field.
Public keys will not work. Keys starting with pk_ are meant for browser widgets and are rejected by every component in this bundle. Read more in Private Keys.

Perceive a page#

Perceive URL takes the URL from the flow and two settings from the form:

Parameter Set by Default Purpose
URL The flow -- The absolute URL to render
Outputs The form markdown 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 component returns each artifact as a signed URL that expires in 15 minutes, plus the text of markdown, cleaned HTML and raw HTML inlined up to 256 KB each. Anything larger, and anything binary, stays a link. The structured output is the exception, arriving inline.


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.

Use an If/Else component after Perceive to branch on the score before passing the markdown to an LLM component. A low score is a signal that the page is not what the agent expected.


Searching and discovering#

Web Search takes a query and optional filters and returns an array of results, each with title, URL, snippet and position.

Discover URLs takes a site URL and a mode (sitemap, crawl, or hybrid) and returns a flat list of URLs on that site without rendering each one. Use this before Perceive to map a site when you want to know what's there without the rendering cost.


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 an error.

Results arrive as an array, 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 Langflow file, not a URL. Wire in a file from an Input component's file field, or a file variable from an earlier component. The component uploads the bytes and returns a signed download URL for the result, valid for about 15 minutes.

The uploaded filename's extension decides the input format. Langflow 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 you need to know what else is on it without rendering anything.

A workflow that extracts structured data#

Chain Discover URLs into Extract Structured to pull typed fields off every page on a site at once, crawled and extracted server-side, delivered as one results array.

A workflow that turns an upload into a summary#

Input (file)  →  Convert File to Markdown  →  Text Splitter  →  LLM  →  Answer

Convert the file to markdown, split it into chunks, pass each chunk to an LLM for summarization, and combine the results.


Troubleshooting#

The component fails with a 401 or 403 error. The API key is wrong, missing, or it is a public pk_ key. Verify you stored a private key (sk_ prefix) in the global variable and selected it in the component's EnConvert API Key field. Test the key in the dashboard by clicking its row.

Perceive returns a link where markdown was expected. The markdown exceeded the 256 KB inline limit, so the component 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 component 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.

Convert File to Markdown returns a 400 with "unsupported format". The file has no recognizable extension and its bytes don't match a known file signature. Add or fix the filename's extension (e.g. .pdf, .docx, .csv) and try again.



Frequently asked questions#

How do I install the EnConvert bundle in Langflow?#

Install the PyPI package (pip install lfx-enconvert) and restart Langflow. The six components appear under the EnConvert bundle in the sidebar. No config needed.

Can I use a public API key?#

No. Public pk_ keys are for browser widgets only and are rejected by every component. Generate a private key in the dashboard and use that.

How do I store the API key so it doesn't appear in the flow JSON?#

Create a global variable in Langflow (Settings > Global Variables), give it your private key, and select that variable in each component's EnConvert API Key field. Global variables are stored securely and never exported in the flow.

How do I perceive a web page in Langflow?#

Add the Perceive URL component, pass it a URL, and leave Outputs at its default. The component renders the page and returns the markdown inline in the component's output. Turn on Only Main Content to drop navigation and footers.

Can I extract structured data from multiple pages at once?#

Yes. Discover URLs lists all URLs on a site, and Extract Structured accepts a comma-separated list of URLs (up to 50). Pass the discovered URLs and the schema into Extract Structured to pull the same fields off every page.

What does render_quality mean?#

Every page Perceive renders gets a render_quality score from 0.0 (blocked or empty) to 1.0 (clean render). Branch on this score with an If/Else component before passing the content to an LLM, so your agent distrusts a low-quality read.