> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/tinybird.md).

# Tinybird

Stream events into Tinybird data sources, query published pipe endpoints and run ad-hoc SQL, and create data sources or publish pipe endpoints on Classic workspaces.

## Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector | Authentication |
| --------- | -------------- |
| Tinybird  | Token          |

### Tinybird

Connect to Tinybird with a static token to stream events and query data.

#### Set up in Tinybird

1. Prepare the Tinybird account or service that the workflow will access. Grant access to the required resources and operations.
2. **Token:** A Tinybird static token. Append Events needs a token with the DATASOURCES:APPEND (or DATASOURCES:CREATE) scope; Create Data Source needs DATASOURCES:CREATE; List Data Sources needs DATASOURCES:READ; List Pipes, Query Pipe Endpoint, and Run SQL Query need PIPES:READ; Publish Pipe Endpoint needs PIPES:CREATE. An admin token covers every action. Manage tokens under the workspace's Tokens page, or see the Token API reference.
3. **Region:** The Tinybird region hosting this workspace. Copy it from the API endpoint shown in your workspace's Data Sources page, or from the host part of any curl example there. Supported hosts: api.tinybird.co (default, EU), api.europe-west2.gcp.tinybird.co, api.us-east.tinybird.co, api.northamerica-northeast2.gcp.tinybird.co, api.eu-central-1.aws.tinybird.co, api.eu-west-1.aws.tinybird.co, api.us-east.aws.tinybird.co, api.us-west-2.aws.tinybird.co, api.ap-east-1.aws.tinybird.co, api.ap-southeast-2.aws.tinybird.co. A self-managed Tinybird Forward host is not supported.

#### Set up in StackAI

1. Open **Settings → Connections**, add a connection, and select **Tinybird**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required                 | What to enter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Token         | Yes                      | A Tinybird static token. Append Events needs a token with the DATASOURCES:APPEND (or DATASOURCES:CREATE) scope; Create Data Source needs DATASOURCES:CREATE; List Data Sources needs DATASOURCES:READ; List Pipes, Query Pipe Endpoint, and Run SQL Query need PIPES:READ; Publish Pipe Endpoint needs PIPES:CREATE. An admin token covers every action. Manage tokens under the workspace's Tokens page, or see the Token API reference. [Provider instructions](https://www.tinybird.co/docs/api-reference/token-api).                                                               |
| Region        | Optional / as applicable | The Tinybird region hosting this workspace. Copy it from the API endpoint shown in your workspace's Data Sources page, or from the host part of any curl example there. Supported hosts: api.tinybird.co (default, EU), api.europe-west2.gcp.tinybird.co, api.us-east.tinybird.co, api.northamerica-northeast2.gcp.tinybird.co, api.eu-central-1.aws.tinybird.co, api.eu-west-1.aws.tinybird.co, api.us-east.aws.tinybird.co, api.us-west-2.aws.tinybird.co, api.ap-east-1.aws.tinybird.co, api.ap-southeast-2.aws.tinybird.co. A self-managed Tinybird Forward host is not supported. |

### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

## Use an action

1. Add the required **Tinybird** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

## Actions

### Append Events

Stream one or more JSON events into a Tinybird data source.

#### Inputs

| Field           | Type            | Required | Description                                                                                  |
| --------------- | --------------- | -------- | -------------------------------------------------------------------------------------------- |
| Data Source     | select (string) | Yes      | The data source that receives the events. Options load from the selected connection.         |
| Events          | textarea        | Yes      | The events to send, as JSON. Use one object, a list of objects, or one object per line.      |
| Wait for Commit | boolean         | No       | Wait until Tinybird confirms the rows are stored. Turn off for lower latency. Default: true. |

#### Outputs

| Field            | Type    | Description                                                |
| ---------------- | ------- | ---------------------------------------------------------- |
| Successful Rows  | integer | Rows Tinybird accepted.                                    |
| Quarantined Rows | integer | Rows that did not match the schema and went to quarantine. |
| Committed        | boolean | Whether Tinybird confirmed the write.                      |

### Query Pipe Endpoint

Get rows from a published Tinybird API endpoint.

#### Inputs

| Field           | Type            | Required | Description                                                                      |
| --------------- | --------------- | -------- | -------------------------------------------------------------------------------- |
| Pipe            | select (string) | Yes      | The published pipe endpoint to query. Options load from the selected connection. |
| Parameters      | textarea        | No       | Values for the endpoint's parameters, as a JSON object.                          |
| SQL Over Result | textarea        | No       | Optional SQL to filter or aggregate the endpoint result.                         |

#### Outputs

| Field     | Type          | Description                                 |
| --------- | ------------- | ------------------------------------------- |
| Rows      | dict\_array   | The rows returned.                          |
| Columns   | object\_array | Column names and types.                     |
| Row Count | integer       | Rows returned.                              |
| Truncated | boolean       | Whether rows were cut at the 1,000-row cap. |

### Run SQL Query

Run a read-only SQL query over your data sources and pipes.

#### Inputs

| Field     | Type     | Required | Description              |
| --------- | -------- | -------- | ------------------------ |
| SQL Query | textarea | Yes      | The SELECT query to run. |

#### Outputs

| Field     | Type          | Description                                       |
| --------- | ------------- | ------------------------------------------------- |
| Rows      | array         | The rows returned.                                |
| Columns   | object\_array | Column names and types.                           |
| Row Count | integer       | Rows the query matched, before the 1,000-row cap. |
| Truncated | boolean       | Whether rows were cut at the 1,000-row cap.       |

### Create Data Source

Create an empty data source with a schema, ready to receive events.

#### Inputs

| Field          | Type            | Required | Description                                                                                                                                                                           |
| -------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name           | string          | Yes      | Name for the new data source. Use letters, numbers and underscores.                                                                                                                   |
| Schema         | textarea        | Yes      | Columns and types, separated by commas.                                                                                                                                               |
| Engine         | select (string) | No       | Storage engine. Keep MergeTree unless you need deduplication or rollups. Available values: MergeTree, ReplacingMergeTree, SummingMergeTree, AggregatingMergeTree. Default: MergeTree. |
| Sorting Key    | string          | No       | Columns that order the data, which speeds up filters on them.                                                                                                                         |
| Version Column | string          | No       | For ReplacingMergeTree: the column that decides which duplicate row to keep.                                                                                                          |
| Partition Key  | string          | No       | Expression that splits the data into partitions, such as by month.                                                                                                                    |
| Time to Live   | string          | No       | Rule that deletes old rows automatically.                                                                                                                                             |

#### Outputs

| Field | Type   | Description       |
| ----- | ------ | ----------------- |
| ID    | string | Data source ID.   |
| Name  | string | Data source name. |

### List Data Sources

List the data sources the token can see.

#### Inputs

| Field         | Type    | Required | Description                                           |
| ------------- | ------- | -------- | ----------------------------------------------------- |
| Name Contains | string  | No       | Only list data sources whose name contains this text. |
| Limit         | integer | No       | Most data sources to return, up to 500.               |

#### Outputs

| Field        | Type          | Description                             |
| ------------ | ------------- | --------------------------------------- |
| Data Sources | object\_array | The data sources found.                 |
| Total Count  | integer       | Matching data sources before the limit. |

### List Pipes

List pipes and see which ones are published as API endpoints.

#### Inputs

| Field          | Type    | Required | Description                                                 |
| -------------- | ------- | -------- | ----------------------------------------------------------- |
| Endpoints Only | boolean | No       | Only list pipes published as API endpoints. Default: false. |
| Name Contains  | string  | No       | Only list pipes whose name contains this text.              |
| Limit          | integer | No       | Most pipes to return, up to 500. Default: 100.              |

#### Outputs

| Field       | Type          | Description                      |
| ----------- | ------------- | -------------------------------- |
| Pipes       | object\_array | The pipes found.                 |
| Total Count | integer       | Matching pipes before the limit. |

### Publish Pipe Endpoint

Publish a pipe node as its API endpoint. This replaces the node the pipe published before.

#### Inputs

| Field | Type            | Required | Description                                                                            |
| ----- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| Pipe  | select (string) | Yes      | The pipe to publish. Options load from the selected connection.                        |
| Node  | select (string) | Yes      | The node whose result becomes the endpoint. Options load from the selected connection. |

#### Outputs

| Field            | Type   | Description                        |
| ---------------- | ------ | ---------------------------------- |
| Pipe ID          | string | Pipe ID.                           |
| Pipe Name        | string | Pipe name.                         |
| Endpoint Node ID | string | The published node.                |
| Endpoint URL     | string | URL of the endpoint's JSON output. |

## Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/tinybird.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
