Getting Started
Quickstart: build your first task
Author a minimal task YAML with connector slots and steps, create it in the task editor, and run it against real connectors.
Quickstart: build your first task
Goal
Write a task that reads users from a CSV file, reshapes each record with JSONata, and upserts the result into SQLite — then create it in the web UI and run it. Along the way you will meet the three ideas every Envoy task is built on: connector slots, steps, and per-record streaming.
Prerequisites
- A running Envoy instance and an account with the
adminorsuperadminrole - A
csvConnector and asqliteConnector created in the deployment (Managing connectors) - A
users.csvfile withid,first_name, andlast_namecolumns, readable by the CSV Connector's configured directory
The task YAML
name: csv-to-sqlite
description: Read users from CSV, transform, and upsert into SQLite
connectors:
csv_source:
type: csv
db:
type: sqlite
steps:
- name: setup_table
type: call_method
config:
connector: db
method: execute
args:
statements: |
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY,
full_name TEXT NOT NULL
)
- name: read_users
type: call_method
config:
connector: csv_source
method: read
args:
resource: users
- name: transform
type: transform
config: |
{
"id": input.id,
"full_name": input.first_name & " " & input.last_name
}
- name: upsert_user
type: call_method
config: |
{
"connector": "db",
"method": "upsert",
"args": {
"table": "users",
"data": input,
"conflict_columns": ["id"]
}
}Reading it top to bottom:
connectorsdeclares two typed slots,csv_sourceanddb. A slot is a name and atype— no paths, no credentials. Which actual CSV directory and SQLite file get used is decided when the task runs, not when it is written. See Connectors and slots.stepsis the pipeline. Records stream through it one at a time:read_usersemits one record per CSV row, and each record flows throughtransformandupsert_userindividually.- The
transformstep's config is a JSONata expression evaluated per record with{input, arguments, steps, variables}as context —inputis the current record. Here it builds a new object withfull_nameconcatenated from two source fields. - The
upsert_userstep shows the second config style: when a step's config is given as a string, the whole config is a JSONata expression, which lets you inject the current record ("data": input) into the method arguments. The static YAML mapping style (setup_table,read_users) is for configs that don't depend on the record.
Create it in the web UI
- Go to Tasks in the sidebar and select New Task.
- Fill in the Name field (for example
csv-to-sqlite) and optionally a Description. - Paste the YAML into the editor and select Create Task.
The server validates the YAML on save. If something is wrong — an unknown step type, a step referencing an undeclared connector slot — the editor shows a "Validation failed" banner listing each issue, and the "More actions" menu offers Fix with AI to hand the issues to the built-in assistant.
Run it
On the task's detail page, select Run Now. Because the task declares connector slots, the Run Configuration dialog asks you to pick a stored Connector for each slot — choose your CSV Connector for csv_source and your SQLite Connector for db — and starts the run.
The run page streams the task's output and logs live.
Or use the CLI
The same YAML runs unchanged from the command line. Put connector configurations in a connectors.yaml file whose names match the slot names, then:
envoy validate csv-to-sqlite
envoy csv-to-sqlite --config connectors.yamlSee the CLI quickstart for the full walkthrough including the connectors.yaml format.
Verify it worked
Query the users table in the SQLite database — with Data Explorer against the db Connector, or any SQLite client — and confirm one row per CSV record with full_name populated.
Related
- Task anatomy — every top-level key:
output,variables,arguments,loop,masking - Working with JSONata — the expression language used in step configs
- Step reference — all step types with their configs
- Task YAML reference — the full schema