koBoToolbox.json•11.7 kB
{
"nodeType": "n8n-nodes-base.koBoToolbox",
"displayName": "KoBoToolbox",
"description": "Work with KoBoToolbox forms and submissions",
"version": 1,
"properties": [
{
"name": "formId",
"displayName": "Form Name or ID",
"type": "options",
"default": "",
"description": "Form ID (e.g. aSAvYreNzVEkrWg5Gdcvg). Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
"required": true,
"displayOptions": {
"show": {
"resource": [
"file"
]
}
}
},
{
"name": "fileId",
"displayName": "File ID",
"type": "string",
"default": "",
"description": "Uid of the file (should start with \"af\" e.g. \"afQoJxA4kmKEXVpkH6SYbhb\"",
"required": true,
"displayOptions": {
"show": {
"resource": [
"file"
],
"operation": [
"delete",
"get"
]
}
}
},
{
"name": "binaryPropertyName",
"displayName": "Property Name",
"type": "string",
"default": "data",
"description": "Name of the binary property to write the file into",
"required": true,
"displayOptions": {
"show": {
"resource": [
"file"
],
"operation": [
"get"
]
}
}
},
{
"name": "download",
"displayName": "Download File Content",
"type": "boolean",
"default": false,
"description": "Whether to download the file content into a binary property",
"required": true,
"displayOptions": {
"show": {
"resource": [
"file"
],
"operation": [
"get"
]
}
}
},
{
"name": "fileMode",
"displayName": "File Upload Mode",
"type": "options",
"default": "binary",
"required": true,
"options": [
{
"name": "Binary File",
"value": "binary"
},
{
"name": "URL",
"value": "url"
}
],
"displayOptions": {
"show": {
"resource": [
"file"
],
"operation": [
"create"
]
}
}
},
{
"name": "fileUrl",
"displayName": "File URL",
"type": "string",
"default": "",
"description": "HTTP(s) link to the file to upload",
"required": true,
"displayOptions": {
"show": {
"resource": [
"file"
],
"operation": [
"create"
],
"fileMode": [
"url"
]
}
}
},
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "get",
"description": "Create a file",
"options": [
{
"name": "Create",
"value": "create",
"description": "Create a file"
},
{
"name": "Delete",
"value": "delete",
"description": "Delete file"
},
{
"name": "Get",
"value": "get",
"description": "Get a file content"
},
{
"name": "Get Many",
"value": "getAll",
"description": "Get many files"
}
],
"displayOptions": {
"show": {
"resource": [
"file"
]
}
}
},
{
"name": "returnAll",
"displayName": "Return All",
"type": "boolean",
"default": false,
"description": "Whether to return all results or only up to a given limit",
"required": true,
"displayOptions": {
"show": {
"resource": [
"form"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "limit",
"displayName": "Limit",
"type": "number",
"default": 1000,
"description": "Max number of results to return",
"typeOptions": {
"maxValue": 3000
},
"displayOptions": {
"show": {
"resource": [
"form"
],
"operation": [
"getAll"
],
"returnAll": [
false
]
}
}
},
{
"name": "options",
"displayName": "Options",
"type": "collection",
"default": {},
"description": "Whether to sort by descending order",
"placeholder": "Add option",
"displayOptions": {
"show": {
"resource": [
"form"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "filters",
"displayName": "Filters",
"type": "collection",
"default": {},
"description": "A text search query based on form data - e.g. \"owner__username:meg AND name__icontains:quixotic\" - see <a href=\"https://github.com/kobotoolbox/kpi#searching\" target=\"_blank\">docs</a> for more details",
"placeholder": "Add Filter",
"options": [
{
"name": "filter",
"displayName": "Filter",
"type": "string",
"default": "asset_type:survey",
"description": "A text search query based on form data - e.g. \"owner__username:meg AND name__icontains:quixotic\" - see <a href=\"https://github.com/kobotoolbox/kpi#searching\" target=\"_blank\">docs</a> for more details"
}
],
"displayOptions": {
"show": {
"resource": [
"form"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "hookId",
"displayName": "Hook ID",
"type": "string",
"default": "",
"description": "Hook ID (starts with h, e.g. hVehywQ2oXPYGHJHKtqth4)",
"required": true,
"displayOptions": {
"show": {
"resource": [
"hook"
],
"operation": [
"get",
"retryOne",
"retryAll",
"getLogs"
]
}
}
},
{
"name": "logId",
"displayName": "Hook Log ID",
"type": "string",
"default": "",
"description": "Hook log ID (starts with hl, e.g. hlSbGKaUKzTVNoWEVMYbLHe)",
"required": true,
"displayOptions": {
"show": {
"resource": [
"hook"
],
"operation": [
"retryOne"
]
}
}
},
{
"name": "status",
"displayName": "Log Status",
"type": "options",
"default": "",
"description": "Only retrieve logs with a specific status",
"options": [
{
"name": "All",
"value": ""
},
{
"name": "Failed",
"value": "0"
},
{
"name": "Pending",
"value": "1"
},
{
"name": "Success",
"value": "2"
}
],
"displayOptions": {
"show": {
"resource": [
"hook"
],
"operation": [
"getLogs"
]
}
}
},
{
"name": "startDate",
"displayName": "Start Date",
"type": "dateTime",
"default": "",
"description": "Minimum date for the hook log to retrieve",
"displayOptions": {
"show": {
"resource": [
"hook"
],
"operation": [
"getLogs"
]
}
}
},
{
"name": "endDate",
"displayName": "End Date",
"type": "dateTime",
"default": "",
"description": "Maximum date for the hook log to retrieve",
"displayOptions": {
"show": {
"resource": [
"hook"
],
"operation": [
"getLogs"
]
}
}
},
{
"name": "submissionId",
"displayName": "Submission ID",
"type": "string",
"default": "",
"description": "Submission ID (number, e.g. 245128)",
"required": true,
"displayOptions": {
"show": {
"resource": [
"submission"
],
"operation": [
"get",
"delete",
"getValidation",
"setValidation"
]
}
}
},
{
"name": "validationStatus",
"displayName": "Validation Status",
"type": "options",
"default": "",
"description": "Desired Validation Status",
"required": true,
"options": [
{
"name": "Approved",
"value": "validation_status_approved"
},
{
"name": "Not Approved",
"value": "validation_status_not_approved"
},
{
"name": "On Hold",
"value": "validation_status_on_hold"
}
],
"displayOptions": {
"show": {
"resource": [
"submission"
],
"operation": [
"setValidation"
]
}
}
},
{
"name": "filterType",
"displayName": "Filter",
"type": "options",
"default": "none",
"options": [
{
"name": "None",
"value": "none"
},
{
"name": "JSON",
"value": "json"
}
],
"displayOptions": {
"show": {
"resource": [
"submission"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "jsonNotice",
"displayName": "See <a href=\"https://github.com/SEL-Columbia/formhub/wiki/Formhub-Access-Points-(API)#api-parameters\" target=\"_blank\">Formhub API docs</a> to creating filters, using the MongoDB JSON format - e.g. {\"_submission_time\":{\"$lt\":\"2021-10-01T01:02:03\"}}",
"type": "notice",
"default": "",
"displayOptions": {
"show": {
"resource": [
"submission"
],
"operation": [
"getAll"
],
"filterType": [
"json"
]
}
}
},
{
"name": "filterJson",
"displayName": "Filters (JSON)",
"type": "string",
"default": "",
"displayOptions": {
"show": {
"resource": [
"submission"
],
"operation": [
"getAll"
],
"filterType": [
"json"
]
}
}
},
{
"name": "resource",
"displayName": "Resource",
"type": "options",
"default": "submission",
"required": true,
"options": [
{
"name": "File",
"value": "file"
},
{
"name": "Form",
"value": "form"
},
{
"name": "Hook",
"value": "hook"
},
{
"name": "Submission",
"value": "submission"
}
]
}
],
"credentialsConfig": [
{
"name": "koBoToolboxApi",
"required": true
},
{
"name": "resource",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}