New to Kestra?
Use blueprints to kickstart your first workflows.
Download multiple CSV files from any HTTP API, convert each to Ion, and write them into separate sheets of a single Excel workbook with Kestra.
id: load-multiple-csv-files-into-excel
namespace: company.team
tasks:
- id: dataset1
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/products.csv
- id: dataset2
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/fruit.csv
- id: convert1
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ outputs.dataset1.uri }}"
- id: convert2
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ outputs.dataset2.uri }}"
- id: write_to_excel
type: io.kestra.plugin.serdes.excel.IonToExcel
from:
Sheet_1: "{{ outputs.convert1.uri }}"
Sheet_2: "{{ outputs.convert2.uri }}"
Turn scattered CSV files into one clean, multi-sheet Excel workbook. This flow downloads several CSV files from an HTTP API, normalizes each one through Kestra's internal Ion format, and writes them into separate, named sheets of a single .xlsx file. It solves the everyday reporting headache of stitching together files that arrive from different endpoints and handing stakeholders a single spreadsheet instead of a folder of loose CSVs.
dataset1 and dataset2 tasks use io.kestra.plugin.core.http.Download to fetch two CSV files from an HTTP API (here, sample products.csv and fruit.csv datasets).convert1 and convert2 tasks use io.kestra.plugin.serdes.csv.CsvToIon to parse each downloaded CSV into Kestra's Amazon Ion format, a typed intermediate representation that makes downstream serialization reliable.write_to_excel task uses io.kestra.plugin.serdes.excel.IonToExcel, mapping each Ion file to a named sheet via the from property (Sheet_1 and Sheet_2) to produce one Excel workbook..xlsx workbook with one sheet per source CSVA spreadsheet tool or a one-off script has no scheduler, no retry logic, and no record of what ran when. With Kestra you define the whole pipeline as declarative YAML, add an event or schedule trigger so the workbook regenerates whenever fresh data lands, set retries on the HTTP downloads so a flaky endpoint does not break your report, and get full execution lineage and logs for every run. The serdes plugins handle format conversion that Excel itself cannot orchestrate end to end.
This flow uses public sample datasets and references no secrets. If you point it at an authenticated API, add credentials with {{ secret('NAME') }} and inject them into the Download task headers.
uri values in dataset1 and dataset2 with your own CSV endpoints..xlsx from the write_to_excel outputs.Download and CsvToIon task pairs and extra keys in the IonToExcel from map to support additional sheets.Schedule or webhook trigger to regenerate the workbook automatically.Download for a database query task to build Excel reports straight from your warehouse.