New to Kestra?
Use blueprints to kickstart your first workflows.
Kestra pipeline that searches for an annual report PDF, downloads it, extracts text with Apache Tika, and produces an OpenAI summary of the data strategy.
Go from a company name to a cited summary of its data and IT strategy in one run. This Kestra blueprint queries the Google Custom Search API for the company's annual report PDF, downloads the first hit into internal storage, extracts the full text with Apache Tika, and asks an OpenAI model to summarize the report with a deliberate focus: data services, data orchestration, real-time data, analytics, and IT infrastructure, quoting the source text where possible. Both the original PDF and the markdown summary are exposed as typed flow outputs, so a parent flow, an app, or an API caller can consume them directly. It is a practical document-intelligence skeleton for sales research, competitive analysis, or investment screening.
look_for_report task (io.kestra.plugin.core.http.Request) calls the Google Custom Search API with the query "company annual report filetype:pdf", authenticated by GOOGLE_SEARCH_API_KEY and the search engine id GOOGLE_SEARCH_CX.download_report task (io.kestra.plugin.core.http.Download) extracts the first result link with jq and streams the PDF into Kestra internal storage.extract_text task (io.kestra.plugin.tika.Parse) converts the PDF to plain text with contentType: TEXT and store: false, keeping the extracted content inline at outputs.extract_text.result.content.summary task (io.kestra.plugin.openai.ChatCompletion) prompts the model chosen in the model SELECT input (defaulting to gpt-4o-mini) at a low temperature of 0.3 for factual output, instructing it to quote the report in support of every claim.outputs publish the PDF as a FILE output named report and the markdown text as the summary string.Scripting this means juggling a search API client, temp files for a large PDF, a parsing library, and an LLM SDK, with nothing persisted when a step fails. Kestra chains the same steps declaratively: internal storage moves the PDF between tasks without local disk, the Tika plugin handles extraction for dozens of formats beyond PDF, secrets keep all three API credentials out of the YAML, and each execution stores the exact search result, document, and prompt for reproducibility. Add a schedule or a ForEach over a company list and the one-off becomes a screening service.
GOOGLE_SEARCH_API_KEY: Google Custom Search JSON API key.GOOGLE_SEARCH_CX: Programmable Search Engine id (cx) used for the query.OPENAI_API_KEY: OpenAI API key used by ChatCompletion.report output and read the markdown summary output.io.kestra.plugin.core.flow.ForEach and aggregate summaries into one digest.result.content in a Python task before the LLM call for very long reports.io.kestra.plugin.ai.agent.AIAgent with a JSON schema to extract structured fields like planned cloud migrations.