Upload File
kobotoolbox.create_file
ActionBusiness appsconnection required
Calls the KoboToolbox API with the connection's credentials.
Upload a media file or map layer onto a form, sent as base64 text.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- KoboToolbox
- Secret shape
- the API token, or {"api_key": "…"}
- Config it needs
- base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
5 fields, 4 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
asset_uid The uid of the KoboToolbox form (asset) to act on, as it appears in its URL. | string | Yes | — | — | aSAvYreNzVEkrWg5Gdcvg |
description A short description of the file, which KoboToolbox requires. | string | Yes | — | — | Village boundary layer |
filename The name to store the file under; form media names must be unique within a form. | string | Yes | — | — | villages.geojson |
base64_content The file's bytes as base64 text, usually taken from an upstream step. | string | Yes | — | — | SGVsbG8sIFdvcmxkIQ== |
file_type Whether this file is form media or a map layer. | string | No | form_media | one of "form_media", "map_layer" | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"asset_uid": "aSAvYreNzVEkrWg5Gdcvg",
"base64_content": "SGVsbG8sIFdvcmxkIQ==",
"description": "Village boundary layer",
"file_type": "form_media",
"filename": "villages.geojson"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
uid The uid of the stored file. | string | — |
url The API URL of the stored file. | string | — |
file_type The kind of file that was stored. | string | — |
description The description that was recorded. | string | — |
content Where the file's bytes can be downloaded. | string | — |
date_created When the file was stored. | string | — |
metadata The file's metadata: filename, mimetype and hash. | object | — |
{
"content": "",
"date_created": "",
"description": "",
"file_type": "",
"metadata": {},
"uid": "",
"url": ""
}Related KoboToolbox nodes
See Upload File run in a workflow.
In a technical demo we add the KoboToolbox connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.