# Redash

> Run Redash queries and SQL and use the rows in a workflow: send a report or a CSV, copy results to a sheet, find queries and dashboards. Start a workflow when an alert is triggered or back to normal, or a query has a new row.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/redash

## Actions

### Download results as CSV

Run a query and save its results as a CSV file in Lodol, as Redash's Download as CSV File makes it, to attach to an email or upload.

**Inputs**

- Query (`query`, text, required): The saved query. Pick one, or give its number, link or name.
- Parameters (`parameters`, object): Values for the query's parameters, such as a region or a date. Leave one blank to use the value saved with the query. A date range takes 2026-11-01 to 2026-11-30, or last 7 days, this month and the like.
- Reuse results up to (minutes old) (`max_age_minutes`, number): Use the results Redash saved from an earlier run with the same values when they are at most this many minutes old, and run the query only when there are none. Up to 10,080 (a week). Leave blank to run it now. From 0 to 10080.
- Wait up to (minutes) (`max_wait_minutes`, number): How long to wait for Redash to run it, 1 to 15 minutes. Defaults to 2. A query still running then carries on in Redash. From 1 to 15.

**Outputs**

- `content_type` (text): text/csv
- `csv` (text): The CSV's text, up to its first 200,000 characters
- `document_ref` (text): The CSV file, for a later step that takes one, such as an email's attachments or a drive upload
- `filename` (text): The file's name, such as Orders-by-region_2026-11-09.csv
- `from_cache` (true/false): True when Redash answered with results it had saved
- `link` (text): A link to the query in Redash
- `parameters` (object): The parameter values it ran with, by name
- `query_id` (number): The query's number
- `query_name` (text): Its name
- `retrieved_at` (text): When the results were made (ISO 8601)
- `row_count` (number): How many rows the CSV has
- `size_bytes` (number): The file's size in bytes

**Example output**

```json
{
  "content_type": "text/csv",
  "csv": "id,region,total\n120,North,140.0\n116,North,172.0\n",
  "document_ref": "doc_7f3a9c2e1b",
  "filename": "Orders-by-region_2026-11-09.csv",
  "from_cache": false,
  "link": "https://redash.example.com/queries/2",
  "parameters": {
    "region": "North"
  },
  "query_id": 2,
  "query_name": "Orders by region",
  "retrieved_at": "2026-11-09T20:08:12.701Z",
  "row_count": 2,
  "size_bytes": 112
}
```

### Find dashboards

Find dashboards by words in their names, with their links.

**Inputs**

- Words (`query`, text): Words in the dashboards' names. Leave blank to list them all.
- How many (`limit`, number): The most to list, up to 250. Defaults to 25. From 1 to 250.

**Outputs**

- `count` (number): How many are listed
- `dashboards` (list): The dashboards found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "dashboards": [
    {
      "created_by": "Ada Admin",
      "id": 1,
      "is_draft": false,
      "link": "https://redash.example.com/dashboard/sales-overview",
      "name": "Sales overview",
      "slug": "sales-overview",
      "tags": [],
      "updated_at": "2026-11-09T20:08:03.548Z"
    }
  ],
  "total": 1
}
```

### Find queries

Find saved queries by words in their names, descriptions or SQL, or by tag, with their links.

**Inputs**

- Words (`query`, text): Words in the queries' names, descriptions or SQL. Leave blank to list them all, newest first.
- Tag (`tag`, text): Only queries with this tag. Leave blank for any.
- How many (`limit`, number): The most to list, up to 250. Defaults to 25. From 1 to 250.

**Outputs**

- `count` (number): How many are listed
- `queries` (list): The queries found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "queries": [
    {
      "created_by": "Ada Admin",
      "data_source_id": 1,
      "description": "One region's orders in a date range",
      "id": 2,
      "is_draft": false,
      "last_run_at": "2026-11-09T20:08:12.701Z",
      "link": "https://redash.example.com/queries/2",
      "name": "Orders by region",
      "parameters": [
        "region",
        "created",
        "min_total"
      ],
      "schedule": "",
      "tags": [
        "sales"
      ],
      "updated_at": "2026-11-09T20:08:03.236Z"
    }
  ],
  "total": 1
}
```

### Get dashboard

Get a dashboard's details and the queries on it, to run each of them, with its public link if it's shared.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard. Pick one, or give its number, link or name.

**Outputs**

- `created_at` (text): When it was made (ISO 8601)
- `created_by` (text): Who made it
- `filters_enabled` (true/false): True when its filters apply to every query on it
- `id` (number): The dashboard's number
- `is_draft` (true/false): True while it's unpublished
- `link` (text): A link to it in Redash
- `name` (text): Its name
- `public_link` (text): Its public link when it's shared; blank otherwise
- `queries` (list): The queries on it, top to bottom
- `query_count` (number): How many queries are on it
- `slug` (text): Its short name in links
- `tags` (list): Its tags
- `text_boxes` (list): The text boxes on it
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "created_at": "2026-11-09T20:08:03.438Z",
  "created_by": "Ada Admin",
  "filters_enabled": false,
  "id": 1,
  "is_draft": false,
  "link": "https://redash.example.com/dashboard/sales-overview",
  "name": "Sales overview",
  "public_link": "",
  "queries": [
    {
      "link": "https://redash.example.com/queries/4",
      "parameters": [],
      "query_id": 4,
      "query_name": "Revenue by region",
      "visualization": "Table",
      "visualization_type": "table"
    }
  ],
  "query_count": 1,
  "slug": "sales-overview",
  "tags": [],
  "text_boxes": [
    "Orders refresh every minute."
  ],
  "updated_at": "2026-11-09T20:08:03.548Z"
}
```

### Get latest results

Get the results Redash last saved for a query, as its page shows them, without running it again.

**Inputs**

- Query (`query`, text, required): The saved query. Pick one, or give its number, link or name.
- Row limit (`limit`, number): The most rows to return, up to 5,000. Defaults to 100. From 1 to 5000.

**Outputs**

- `columns` (list): The columns, in order
- `from_cache` (true/false): True when Redash answered with results it had saved
- `has_more` (true/false): True when the results had more rows than returned
- `link` (text): A link to the query in Redash
- `parameters` (object): The parameter values it ran with, by name
- `query_id` (number): The query's number
- `query_name` (text): Its name
- `result_id` (number): The number Redash gave these results
- `retrieved_at` (text): When the results were made (ISO 8601)
- `row_count` (number): How many rows are returned
- `rows` (list): The rows, each an object keyed by column name
- `runtime_seconds` (number): How long the query took to run, in seconds
- `total_rows` (number): How many rows the results have in all

**Example output**

```json
{
  "columns": [
    {
      "label": "id",
      "name": "id",
      "type": "integer"
    },
    {
      "label": "region",
      "name": "region",
      "type": "string"
    },
    {
      "label": "total",
      "name": "total",
      "type": "float"
    }
  ],
  "from_cache": true,
  "has_more": false,
  "link": "https://redash.example.com/queries/2",
  "parameters": {},
  "query_id": 2,
  "query_name": "Orders by region",
  "result_id": 41,
  "retrieved_at": "2026-11-09T20:08:12.701Z",
  "row_count": 2,
  "rows": [
    {
      "id": 120,
      "region": "North",
      "total": 140.0
    },
    {
      "id": 116,
      "region": "North",
      "total": 172.0
    }
  ],
  "runtime_seconds": 0.013,
  "total_rows": 2
}
```

### Get query

Get a saved query's details: its SQL, its parameters with their saved values, its refresh schedule and visualizations.

**Inputs**

- Query (`query`, text, required): The saved query. Pick one, or give its number, link or name.

**Outputs**

- `created_at` (text): When it was made (ISO 8601)
- `created_by` (text): Who made it
- `data_source_id` (number): The number of the data source it runs on
- `description` (text): Its description
- `id` (number): The query's number
- `is_archived` (true/false): True when it's archived
- `is_draft` (true/false): True while it's unpublished
- `last_run_at` (text): When its saved results were made (ISO 8601); blank if never run
- `link` (text): A link to it in Redash
- `name` (text): Its name
- `parameters` (list): Its parameters
- `runtime_seconds` (number): How long its last run took, in seconds
- `schedule` (text): How often Redash refreshes it, such as every day at 08:00 UTC; blank for never
- `sql` (text): Its SQL
- `tags` (list): Its tags
- `updated_at` (text): When it last changed (ISO 8601)
- `visualizations` (list): Its visualizations

**Example output**

```json
{
  "created_at": "2026-11-09T20:08:03.193Z",
  "created_by": "Ada Admin",
  "data_source_id": 1,
  "description": "One region's orders in a date range",
  "id": 2,
  "is_archived": false,
  "is_draft": false,
  "last_run_at": "2026-11-09T20:08:12.701Z",
  "link": "https://redash.example.com/queries/2",
  "name": "Orders by region",
  "parameters": [
    {
      "choices": [
        "North",
        "South",
        "East",
        "West"
      ],
      "default": "North",
      "multiple": false,
      "name": "region",
      "title": "Region",
      "type": "dropdown list"
    }
  ],
  "runtime_seconds": 0.013,
  "schedule": "",
  "sql": "SELECT id, region, total FROM orders WHERE region = '{{ region }}'",
  "tags": [
    "sales"
  ],
  "updated_at": "2026-11-09T20:08:03.236Z",
  "visualizations": [
    {
      "id": 2,
      "name": "Table",
      "type": "table"
    }
  ]
}
```

### List alerts

List Redash's alerts with their state, triggered ones first: what each checks and when it last changed.

**Inputs**

- State (`state`, text): Only alerts in this state. Leave blank for all. One of: `triggered`, `ok`, `unknown`.
- Words (`query`, text): Words in the alerts' or their queries' names. Leave blank for all.

**Outputs**

- `alerts` (list): The alerts, triggered ones first
- `count` (number): How many are listed
- `triggered_count` (number): How many of them are triggered

**Example output**

```json
{
  "alerts": [
    {
      "column": "pending",
      "condition": "pending > 30",
      "id": 1,
      "last_changed_at": "2026-11-09T20:30:12.000Z",
      "link": "https://redash.example.com/alerts/1",
      "muted": false,
      "name": "Too many pending orders",
      "operator": ">",
      "query_id": 3,
      "query_link": "https://redash.example.com/queries/3",
      "query_name": "Pending orders",
      "rearm_seconds": 0,
      "state": "triggered",
      "threshold": "30"
    }
  ],
  "count": 1,
  "triggered_count": 1
}
```

### List data sources

List the data sources Lodol's Redash user can query, and which only run saved queries.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `data_sources` (list): The data sources

**Example output**

```json
{
  "count": 1,
  "data_sources": [
    {
      "id": 1,
      "name": "Shop",
      "paused": false,
      "type": "pg",
      "view_only": false
    }
  ]
}
```

### Run query

Run a saved query with its parameters and get the rows, to send as a report or copy to a sheet.

**Inputs**

- Query (`query`, text, required): The saved query. Pick one, or give its number, link or name.
- Parameters (`parameters`, object): Values for the query's parameters, such as a region or a date. Leave one blank to use the value saved with the query. A date range takes 2026-11-01 to 2026-11-30, or last 7 days, this month and the like.
- Reuse results up to (minutes old) (`max_age_minutes`, number): Use the results Redash saved from an earlier run with the same values when they are at most this many minutes old, and run the query only when there are none. Up to 10,080 (a week). Leave blank to run it now. From 0 to 10080.
- Row limit (`limit`, number): The most rows to return, up to 5,000. Defaults to 100. From 1 to 5000.
- Wait up to (minutes) (`max_wait_minutes`, number): How long to wait for Redash to run it, 1 to 15 minutes. Defaults to 2. A query still running then carries on in Redash. From 1 to 15.

**Outputs**

- `columns` (list): The columns, in order
- `from_cache` (true/false): True when Redash answered with results it had saved
- `has_more` (true/false): True when the results had more rows than returned
- `link` (text): A link to the query in Redash
- `parameters` (object): The parameter values it ran with, by name
- `query_id` (number): The query's number
- `query_name` (text): Its name
- `result_id` (number): The number Redash gave these results
- `retrieved_at` (text): When the results were made (ISO 8601)
- `row_count` (number): How many rows are returned
- `rows` (list): The rows, each an object keyed by column name
- `runtime_seconds` (number): How long the query took to run, in seconds
- `total_rows` (number): How many rows the results have in all

**Example output**

```json
{
  "columns": [
    {
      "label": "id",
      "name": "id",
      "type": "integer"
    },
    {
      "label": "region",
      "name": "region",
      "type": "string"
    },
    {
      "label": "total",
      "name": "total",
      "type": "float"
    }
  ],
  "from_cache": false,
  "has_more": false,
  "link": "https://redash.example.com/queries/2",
  "parameters": {
    "created": {
      "end": "2026-11-09",
      "start": "2026-10-10"
    },
    "min_total": 100,
    "region": "North"
  },
  "query_id": 2,
  "query_name": "Orders by region",
  "result_id": 41,
  "retrieved_at": "2026-11-09T20:08:12.701Z",
  "row_count": 2,
  "rows": [
    {
      "id": 120,
      "region": "North",
      "total": 140.0
    },
    {
      "id": 116,
      "region": "North",
      "total": 172.0
    }
  ],
  "runtime_seconds": 0.013,
  "total_rows": 2
}
```

### Run SQL query

Run SQL on a data source without saving it as a query, and get the rows. It runs with the data source's own access, so it can change data if that allows.

**Inputs**

- Data source (`data_source`, text, required): The data source. Pick one, or type its name.
- SQL (`sql`, text, required): The SQL to run, written for that data source, such as SELECT * FROM orders.
- Row limit (`limit`, number): The most rows to return, up to 5,000. Defaults to 100. From 1 to 5000.
- Wait up to (minutes) (`max_wait_minutes`, number): How long to wait for Redash to run it, 1 to 15 minutes. Defaults to 2. A query still running then carries on in Redash. From 1 to 15.

**Outputs**

- `columns` (list): The columns, in order
- `data_source_id` (number): The data source's number
- `data_source_name` (text): Its name
- `has_more` (true/false): True when the results had more rows than returned
- `result_id` (number): The number Redash gave these results
- `retrieved_at` (text): When the results were made (ISO 8601)
- `row_count` (number): How many rows are returned
- `rows` (list): The rows, each an object keyed by column name
- `runtime_seconds` (number): How long the SQL took to run, in seconds
- `total_rows` (number): How many rows the results have in all

**Example output**

```json
{
  "columns": [
    {
      "label": "id",
      "name": "id",
      "type": "integer"
    },
    {
      "label": "region",
      "name": "region",
      "type": "string"
    },
    {
      "label": "total",
      "name": "total",
      "type": "float"
    }
  ],
  "data_source_id": 1,
  "data_source_name": "Shop",
  "has_more": false,
  "result_id": 42,
  "retrieved_at": "2026-11-09T20:09:00.000Z",
  "row_count": 2,
  "rows": [
    {
      "id": 120,
      "region": "North",
      "total": 140.0
    },
    {
      "id": 116,
      "region": "North",
      "total": 172.0
    }
  ],
  "runtime_seconds": 0.004,
  "total_rows": 2
}
```
