Add Datasource
Queue a knowledge-base file for ingestion.
Type
kb.add-datasourceFolder
kbChannels
Any
Pipe
Value
Scope
Any
Add Datasource (canvas label KB Add Datasource) queues a file already in the workspace for ingestion into a knowledge base.
Ingestion runs in the background. This block continues as soon as the datasource is queued — the file is not searchable yet. Check status with Get Datasource (or List Datasources) before you Query.
Structured is for row-like files (CSV, JSONL, Excel, text). Unstructured is for documents. Strict knowledge bases only accept structured content. Uploads are limited to 25MB on the knowledge base page; the file you pass here must already exist (for example from an Upload step).
Configure
| Setting | Description |
|---|---|
| Knowledge base | Store to ingest into (required) |
| Datasource type | Structured or Unstructured |
| File ID | Workspace file id to ingest (required) |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the datasource is queued |
Pipe schema
The next block reads this on the data pipe (pipe.value). The value is a datasource object:
| Key | Type | Description |
|---|---|---|
id | text | Datasource id |
type | text | structured or unstructured |
content | text | Stored content reference |
addedAt | text | When it was added |
status | text | Processing status |
processedAt | text | When processing finished, if done |
error | text | Error message when processing failed |
progress | text | Progress text while processing |
file | text | File id when set |
url | text | Source URL when set |
config | object | Extra ingestion settings |
Use case
- After a chat file upload, ingest the document so later Query steps can search it.
- Poll Get Datasource until
statusshows the file is ready.