InfluxDB

App · 11 actions

Write sensor readings and other data points to InfluxDB from workflows, read a field's latest or average value, run Flux queries, manage buckets and run tasks. Start a workflow when a value crosses a threshold, a task fails or a check changes status.

Actions

ActionWhat it does
Create bucketCreate a bucket that keeps data for as long as you choose, such as for a new site or customer.
Delete bucketDelete a bucket and every point in it.
Delete dataDelete a measurement's points in a time range, such as a faulty sensor's readings, optionally only those with some tag values.
Get field valueRead a field's latest, average, highest, lowest or total value over the last hour, day or week, such as a room's temperature, without writing a query.
List bucketsList the buckets in your organization, with how long each keeps data.
List task runsList a task's recent runs, newest first, with how each went and why a failed one failed.
List tasksList your tasks (scheduled Flux scripts) by name, with how often each runs and how its last run went.
Run Flux queryRun a Flux query and get its rows back as one list of records, with a key per column (_time, _value, _field and each tag).
Run taskRun a task now, outside its schedule, such as to fill in a report before it's sent, and wait up to a minute for it to finish.
Write data pointWrite one data point to a bucket, such as a sensor reading from a webhook or a number from a form: its measurement, tags and fields, at a time you give or now.
Write line protocolWrite several data points at once as InfluxDB line protocol, one point a line, such as readings collected by another step.

Create bucket

Create a bucket that keeps data for as long as you choose, such as for a new site or customer. One of that name already there is returned as it is.

Inputs

NamenametextRequired
The bucket's name, such as site-amsterdam.
Keep data forretentiontext
How long to keep each point, such as 30d, 12w or 1y (at least 1h). Leave blank to keep data forever.
Descriptiondescriptiontext
What the bucket is for.

Outputs

createdtrue/false
True if it was made now; false if a bucket of that name was there
created_attext
When it was made
descriptiontext
Its description
idtext
The bucket's ID
linktext
Where to open it in InfluxDB
nametext
Its name
retentiontext
How long it keeps data, such as 30 days, or Forever
retention_secondsnumber
How long it keeps data, in seconds; 0 is forever
typetext
user, or system for InfluxDB's own buckets
updated_attext
When it last changed
Example output
{
  "created": true,
  "created_at": "2026-05-01T10:00:00Z",
  "description": "Room sensors",
  "id": "fbc3488665d01e58",
  "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/load-data/buckets/fbc3488665d01e58",
  "name": "sensors",
  "retention": "30 days",
  "retention_seconds": 2592000,
  "type": "user",
  "updated_at": "2026-05-01T10:00:00Z"
}

Delete bucket

Delete a bucket and every point in it. This can't be undone.

Inputs

BucketbuckettextRequired
The bucket to delete: its name or ID.

Outputs

deletedtrue/false
True once it's gone
idtext
The deleted bucket's ID
nametext
Its name
Example output
{
  "deleted": true,
  "id": "fbc3488665d01e58",
  "name": "sensors-old"
}

Delete data

Delete a measurement's points in a time range, such as a faulty sensor's readings, optionally only those with some tag values. This can't be undone.

Inputs

BucketbuckettextRequired
The bucket to delete from.
MeasurementmeasurementtextRequired
The measurement whose points to delete.
Fromstartdate and timeRequired
Delete points from this time on.
Untilstopdate and time
Delete points up to this time. Leave blank for now.
Tag filtersfiltersobject
Only points with these tag values, such as sensor_id th-09. Leave blank for all of the measurement's points.

Outputs

buckettext
The bucket
measurementtext
The measurement whose points were deleted
predicatetext
Which points, as InfluxDB was asked
starttext
From when, in UTC
stoptext
Until when, in UTC
Example output
{
  "bucket": "sensors",
  "measurement": "environment",
  "predicate": "_measurement=\"environment\" AND \"sensor_id\"=\"th-09\"",
  "start": "2026-05-01T00:00:00Z",
  "stop": "2026-05-02T00:00:00Z"
}

Get field value

Read a field's latest, average, highest, lowest or total value over the last hour, day or week, such as a room's temperature, without writing a query. Narrow it by tags.

Inputs

BucketbuckettextRequired
The bucket to read.
MeasurementmeasurementtextRequired
The measurement, such as environment.
FieldfieldtextRequired
The field, such as temperature.
Tag filtersfiltersobject
Only points with these tag values, such as room kitchen. Leave blank for every series.
Over the lasttime_rangetext
How far back to look, such as 15m, 1h, 24h or 7d. Defaults to 1h.Default: 1h.
Valueaggregatetext
Which value: the latest, or the points combined.One of: last (Latest value), first (Earliest value), mean (Average), min (Lowest), max (Highest), sum (Total), count (Number of points). Default: last.

Outputs

aggregatetext
How the points were combined: last, first, mean, min, max, sum or count
buckettext
The bucket read
fieldtext
The field read
foundtrue/false
Whether there were any points in the time range
measurementtext
The measurement read
serieslist
The value for each series (each set of tags) on its own
series_countnumber
How many series matched
timetext
When that value was recorded (latest and earliest only)
time_rangetext
How far back it looked, such as 1h
valuenumber
The value: the latest, average, highest and so on, over every series matched together. Empty when there were no points.
Example output
{
  "aggregate": "last",
  "bucket": "sensors",
  "field": "temperature",
  "found": true,
  "measurement": "environment",
  "series": [
    {
      "series": "room=kitchen,sensor_id=th-01",
      "tags": {
        "room": "kitchen",
        "sensor_id": "th-01"
      },
      "time": "2026-05-04T09:25:00Z",
      "value": 21.5
    },
    {
      "series": "room=server room,sensor_id=th-03",
      "tags": {
        "room": "server room",
        "sensor_id": "th-03"
      },
      "time": "2026-05-04T09:29:00Z",
      "value": 24.1
    }
  ],
  "series_count": 2,
  "time": "2026-05-04T09:29:00Z",
  "time_range": "1h",
  "value": 24.1
}

List buckets

List the buckets in your organization, with how long each keeps data.

Inputs

Include InfluxDB's owninclude_systemtrue/false
Also list _monitoring and _tasks, where InfluxDB keeps check statuses and task logs.Default: false.
How manylimitnumber
The most to list. Defaults to 25.From 1 to 100.

Outputs

bucketslist
The buckets, by name
countnumber
How many are listed
totalnumber
How many there are in all
Example output
{
  "buckets": [
    {
      "created_at": "2026-05-01T10:00:00Z",
      "description": "",
      "id": "0a1b2c3d4e5f6071",
      "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/load-data/buckets/0a1b2c3d4e5f6071",
      "name": "energy",
      "retention": "Forever",
      "retention_seconds": 0,
      "type": "user",
      "updated_at": "2026-05-01T10:00:00Z"
    },
    {
      "created_at": "2026-05-01T10:00:00Z",
      "description": "Room sensors",
      "id": "fbc3488665d01e58",
      "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/load-data/buckets/fbc3488665d01e58",
      "name": "sensors",
      "retention": "30 days",
      "retention_seconds": 2592000,
      "type": "user",
      "updated_at": "2026-05-01T10:00:00Z"
    }
  ],
  "count": 2,
  "total": 2
}

List task runs

List a task's recent runs, newest first, with how each went and why a failed one failed.

Inputs

TasktasktextRequired
The task: its name or ID.
Statusstatustext
Only runs that ended this way.One of: failed, success (Succeeded), started (Running), scheduled, canceled.
How manylimitnumber
The most runs to list. Defaults to 10.From 1 to 100.

Outputs

countnumber
How many are listed
runslist
Its runs, newest first
task_idtext
The task's ID
task_nametext
The task's name
Example output
{
  "count": 1,
  "runs": [
    {
      "error": "",
      "finished_at": "2026-05-04T09:30:00.41Z",
      "id": "1198e11f970d3000",
      "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/tasks/1198e11b9f0d3000/runs",
      "log": [
        "Started task from script: \u2026",
        "Completed(success)"
      ],
      "requested_at": "2026-05-04T09:30:00Z",
      "scheduled_for": "2026-05-04T09:30:00Z",
      "started_at": "2026-05-04T09:30:00.32Z",
      "status": "success",
      "task_id": "1198e11b9f0d3000",
      "task_name": "Downsample sensors hourly"
    }
  ],
  "task_id": "1198e11b9f0d3000",
  "task_name": "Downsample sensors hourly"
}

List tasks

List your tasks (scheduled Flux scripts) by name, with how often each runs and how its last run went.

Inputs

Searchsearchtext
Words in the task's name or description.
Statusstatustext
Only active or only inactive tasks.One of: active, inactive.
How manylimitnumber
The most to list. Defaults to 25.From 1 to 100.

Outputs

countnumber
How many are listed
taskslist
The tasks, by name
totalnumber
How many matched in all
Example output
{
  "count": 1,
  "tasks": [
    {
      "cron": "",
      "description": "",
      "every": "1h",
      "id": "1198e11b9f0d3000",
      "last_run_error": "",
      "last_run_status": "success",
      "latest_completed": "2026-05-04T09:00:00Z",
      "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/tasks/1198e11b9f0d3000/runs",
      "name": "Downsample sensors hourly",
      "status": "active",
      "updated_at": "2026-05-01T10:00:00Z"
    }
  ],
  "total": 1
}

Run Flux query

Run a Flux query and get its rows back as one list of records, with a key per column (_time, _value, _field and each tag).

Inputs

Flux queryquerytextRequired
The query, such as from(bucket: "sensors") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "environment").
Most rowsmax_rowsnumber
The most rows to return. Defaults to 100, up to 1000.From 1 to 1000.

Outputs

columnslist
The columns the rows have
countnumber
How many rows came back
rowslist
The rows, one record per row with a key per column the query returns, such as _time, _value, _field, _measurement and each tag
tablesnumber
How many tables (series) the rows came from
truncatedtrue/false
Whether there were more rows than the most asked for
Example output
{
  "columns": [
    "_start",
    "_stop",
    "_time",
    "_value",
    "_field",
    "_measurement",
    "room"
  ],
  "count": 2,
  "rows": [
    {
      "_field": "temperature",
      "_measurement": "environment",
      "_start": "2026-05-04T08:30:00Z",
      "_stop": "2026-05-04T09:30:00Z",
      "_time": "2026-05-04T09:29:00Z",
      "_value": 21.5,
      "room": "kitchen"
    },
    {
      "_field": "temperature",
      "_measurement": "environment",
      "_start": "2026-05-04T08:30:00Z",
      "_stop": "2026-05-04T09:30:00Z",
      "_time": "2026-05-04T09:29:00Z",
      "_value": 24.1,
      "room": "server room"
    }
  ],
  "tables": 2,
  "truncated": false
}

Run task

Run a task now, outside its schedule, such as to fill in a report before it's sent, and wait up to a minute for it to finish.

Inputs

TasktasktextRequired
The task: its name or ID.
Wait for itwaittrue/false
Wait up to a minute for the run to finish and say how it went. Turn off to only start it.Default: true.

Outputs

errortext
Why it failed, if it did
finishedtrue/false
Whether the run finished within the minute Lodol waits
finished_attext
When it finished
idtext
The run's ID
linktext
Where to open the task's runs in InfluxDB
loglist
Its log messages, oldest first
requested_attext
When it was asked for, for a run started by hand
scheduled_fortext
The time the run is for
started_attext
When it started
statustext
scheduled, started, success, failed or canceled
task_idtext
The task's ID
task_nametext
The task's name
Example output
{
  "error": "",
  "finished": true,
  "finished_at": "2026-05-04T09:30:00.41Z",
  "id": "1198e11f970d3000",
  "link": "https://us-east-1-1.aws.cloud2.influxdata.com/orgs/3a50d630fdda09d3/tasks/1198e11b9f0d3000/runs",
  "log": [
    "Started task from script: \u2026",
    "Completed(success)"
  ],
  "requested_at": "2026-05-04T09:30:00Z",
  "scheduled_for": "2026-05-04T09:30:00Z",
  "started_at": "2026-05-04T09:30:00.32Z",
  "status": "success",
  "task_id": "1198e11b9f0d3000",
  "task_name": "Downsample sensors hourly"
}

Write data point

Write one data point to a bucket, such as a sensor reading from a webhook or a number from a form: its measurement, tags and fields, at a time you give or now.

Inputs

BucketbuckettextRequired
The bucket to write to.
MeasurementmeasurementtextRequired
What the point measures, such as environment or power.
FieldsfieldsobjectRequired
The values, by name, such as temperature 21.5 and door_open true. A value that reads as a number or true/false is written as one; wrap text in double quotes ("42") to keep it text.
Tagstagsobject
Labels to find the point by later, such as room kitchen and sensor_id th-01. Values are always text.
Timetimestampdate and time
When it was measured: a date and time, or a Unix time. Leave blank for now.
Whole numberswhole_numberstext
How to write whole numbers such as 23. Keep As decimals unless the field already holds integers in this bucket.One of: float (As decimals (23 is written as 23.0)), integer (As whole numbers (integers)). Default: float.

Outputs

buckettext
The bucket it was written to
fieldsobject
Its fields, such as {"temperature": 21.5}
linetext
The point as it was written, in line protocol
measurementtext
The measurement, such as environment
tagsobject
Its tags, such as {"room": "kitchen"}
timetext
The point's time, in UTC
Example output
{
  "bucket": "sensors",
  "fields": {
    "humidity": 48,
    "temperature": 21.5
  },
  "line": "environment,room=kitchen,sensor_id=th-01 temperature=21.5,humidity=48.0 1777887000000000000",
  "measurement": "environment",
  "tags": {
    "room": "kitchen",
    "sensor_id": "th-01"
  },
  "time": "2026-05-04T09:30:00Z"
}

Write line protocol

Write several data points at once as InfluxDB line protocol, one point a line, such as readings collected by another step.

Inputs

BucketbuckettextRequired
The bucket to write to.
LineslinestextRequired
One point a line, such as environment,room=kitchen temperature=21.5,humidity=48 1777887000. Lines starting with # are skipped.
Time unitprecisiontext
The unit of the times at the end of the lines. Defaults to nanoseconds.One of: ns (Nanoseconds), us (Microseconds), ms (Milliseconds), s (Seconds). Default: ns.

Outputs

buckettext
The bucket they were written to
pointsnumber
How many points (lines) were written
precisiontext
The unit of the lines' times: ns, us, ms or s
Example output
{
  "bucket": "sensors",
  "points": 3,
  "precision": "s"
}

On this page