Write Data
Writes structured records to a Business Data Collection in the Admin Console for analytics and downstream use.
What it does
The Write Data block sends a POST request to the Admin Console business data collections write API. Each message carries one or more field values that are merged into a single row according to the collection schema you configure on the node.
This block has no output pin in the canvas (outputs: 0 in the product seed): it completes when the HTTP call finishes.
Inputs (msg.payload)
records (array, required)
An array of objects. Each object must have exactly one key, and that key must appear in the node’s configured schema keys (comma-separated fields in the block configuration).
Example shape:
{
"records": [
{ "order_id": "ORD-1001" },
{ "amount": "49.99" },
{ "status": "completed" }
]
}The handler walks the array and merges values whose keys are allowed by the schema. Keys not listed in fields are ignored.
If the same key appears more than once in records, the later value overwrites the earlier one before the request is sent.
Block configuration
fields: Comma-separated list of allowed record keys (must match the keys you send inrecords).api_url: Three path segments,collectionId/projectId/organizationId, used to build the write URL (see handler).projectName/organizationName: Included in the JSON body sent to the API.rapflow_access_token: Optional Bearer token if you are not usingx-api-keyon the HTTP request.
Authentication
The handler requires either:
- An
x-api-keyheader on the incoming request to the flow runtime, or - A configured
rapflow_access_token(sent asAuthorization: Bearer …).
If neither is present, the block throws No Authentication!
Outputs
There is no downstream message from this node. Success or failure is determined by the Admin Console API response on the server side.
Example
{
"records": [
{ "event_name": "flow_completed" },
{ "run_id": "run-2026-04-06-001" }
]
}Limitations
- Only keys listed in the node
fieldsconfiguration are written; extra keys in each one-key object are still subject to that filter. - The block does not validate types beyond what the Admin Console API enforces.
Common mistakes
- Sending
recordsas a single object instead of an array of one-key objects. - Omitting both
x-api-keyandrapflow_access_token. - Mismatch between
fieldsand the keys used inrecords. - Incorrect
api_urlsegment order (collectionId/projectId/organizationId).