Redash

App · 10 actions

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.

Actions

ActionWhat it does
Download results as CSVRun 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.
Find dashboardsFind dashboards by words in their names, with their links.
Find queriesFind saved queries by words in their names, descriptions or SQL, or by tag, with their links.
Get dashboardGet a dashboard's details and the queries on it, to run each of them, with its public link if it's shared.
Get latest resultsGet the results Redash last saved for a query, as its page shows them, without running it again.
Get queryGet a saved query's details: its SQL, its parameters with their saved values, its refresh schedule and visualizations.
List alertsList Redash's alerts with their state, triggered ones first: what each checks and when it last changed.
List data sourcesList the data sources Lodol's Redash user can query, and which only run saved queries.
Run queryRun a saved query with its parameters and get the rows, to send as a report or copy to a sheet.
Run SQL queryRun SQL on a data source without saving it as a query, and get the rows.

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

QueryquerytextRequired
The saved query. Pick one, or give its number, link or name.
Parametersparametersobject
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_minutesnumber
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_minutesnumber
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_typetext
text/csv
csvtext
The CSV's text, up to its first 200,000 characters
document_reftext
The CSV file, for a later step that takes one, such as an email's attachments or a drive upload
filenametext
The file's name, such as Orders-by-region_2026-11-09.csv
from_cachetrue/false
True when Redash answered with results it had saved
linktext
A link to the query in Redash
parametersobject
The parameter values it ran with, by name
query_idnumber
The query's number
query_nametext
Its name
retrieved_attext
When the results were made (ISO 8601)
row_countnumber
How many rows the CSV has
size_bytesnumber
The file's size in bytes
Example output
{
  "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

Wordsquerytext
Words in the dashboards' names. Leave blank to list them all.
How manylimitnumber
The most to list, up to 250. Defaults to 25.From 1 to 250.

Outputs

countnumber
How many are listed
dashboardslist
The dashboards found
totalnumber
How many match in all
Example output
{
  "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

Wordsquerytext
Words in the queries' names, descriptions or SQL. Leave blank to list them all, newest first.
Tagtagtext
Only queries with this tag. Leave blank for any.
How manylimitnumber
The most to list, up to 250. Defaults to 25.From 1 to 250.

Outputs

countnumber
How many are listed
querieslist
The queries found
totalnumber
How many match in all
Example output
{
  "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

DashboarddashboardtextRequired
The dashboard. Pick one, or give its number, link or name.

Outputs

created_attext
When it was made (ISO 8601)
created_bytext
Who made it
filters_enabledtrue/false
True when its filters apply to every query on it
idnumber
The dashboard's number
is_drafttrue/false
True while it's unpublished
linktext
A link to it in Redash
nametext
Its name
public_linktext
Its public link when it's shared; blank otherwise
querieslist
The queries on it, top to bottom
query_countnumber
How many queries are on it
slugtext
Its short name in links
tagslist
Its tags
text_boxeslist
The text boxes on it
updated_attext
When it last changed (ISO 8601)
Example output
{
  "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

QueryquerytextRequired
The saved query. Pick one, or give its number, link or name.
Row limitlimitnumber
The most rows to return, up to 5,000. Defaults to 100.From 1 to 5000.

Outputs

columnslist
The columns, in order
from_cachetrue/false
True when Redash answered with results it had saved
has_moretrue/false
True when the results had more rows than returned
linktext
A link to the query in Redash
parametersobject
The parameter values it ran with, by name
query_idnumber
The query's number
query_nametext
Its name
result_idnumber
The number Redash gave these results
retrieved_attext
When the results were made (ISO 8601)
row_countnumber
How many rows are returned
rowslist
The rows, each an object keyed by column name
runtime_secondsnumber
How long the query took to run, in seconds
total_rowsnumber
How many rows the results have in all
Example output
{
  "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

QueryquerytextRequired
The saved query. Pick one, or give its number, link or name.

Outputs

created_attext
When it was made (ISO 8601)
created_bytext
Who made it
data_source_idnumber
The number of the data source it runs on
descriptiontext
Its description
idnumber
The query's number
is_archivedtrue/false
True when it's archived
is_drafttrue/false
True while it's unpublished
last_run_attext
When its saved results were made (ISO 8601); blank if never run
linktext
A link to it in Redash
nametext
Its name
parameterslist
Its parameters
runtime_secondsnumber
How long its last run took, in seconds
scheduletext
How often Redash refreshes it, such as every day at 08:00 UTC; blank for never
sqltext
Its SQL
tagslist
Its tags
updated_attext
When it last changed (ISO 8601)
visualizationslist
Its visualizations
Example output
{
  "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

Statestatetext
Only alerts in this state. Leave blank for all.One of: triggered, ok, unknown.
Wordsquerytext
Words in the alerts' or their queries' names. Leave blank for all.

Outputs

alertslist
The alerts, triggered ones first
countnumber
How many are listed
triggered_countnumber
How many of them are triggered
Example output
{
  "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

countnumber
How many
data_sourceslist
The data sources
Example output
{
  "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

QueryquerytextRequired
The saved query. Pick one, or give its number, link or name.
Parametersparametersobject
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_minutesnumber
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 limitlimitnumber
The most rows to return, up to 5,000. Defaults to 100.From 1 to 5000.
Wait up to (minutes)max_wait_minutesnumber
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

columnslist
The columns, in order
from_cachetrue/false
True when Redash answered with results it had saved
has_moretrue/false
True when the results had more rows than returned
linktext
A link to the query in Redash
parametersobject
The parameter values it ran with, by name
query_idnumber
The query's number
query_nametext
Its name
result_idnumber
The number Redash gave these results
retrieved_attext
When the results were made (ISO 8601)
row_countnumber
How many rows are returned
rowslist
The rows, each an object keyed by column name
runtime_secondsnumber
How long the query took to run, in seconds
total_rowsnumber
How many rows the results have in all
Example output
{
  "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 sourcedata_sourcetextRequired
The data source. Pick one, or type its name.
SQLsqltextRequired
The SQL to run, written for that data source, such as SELECT * FROM orders.
Row limitlimitnumber
The most rows to return, up to 5,000. Defaults to 100.From 1 to 5000.
Wait up to (minutes)max_wait_minutesnumber
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

columnslist
The columns, in order
data_source_idnumber
The data source's number
data_source_nametext
Its name
has_moretrue/false
True when the results had more rows than returned
result_idnumber
The number Redash gave these results
retrieved_attext
When the results were made (ISO 8601)
row_countnumber
How many rows are returned
rowslist
The rows, each an object keyed by column name
runtime_secondsnumber
How long the SQL took to run, in seconds
total_rowsnumber
How many rows the results have in all
Example output
{
  "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
}

On this page