Documentation

pushbullet.pushNote() function

Flux 0.66.0+

The pushbullet.pushNote() function sends a push notification of type note to the Pushbullet API.

import "pushbullet"

pushbullet.pushNote(
  url: "https://api.pushbullet.com/v2/pushes",
  token: "",
  title: "This is a push notification!",
  text: "This push notification came from Flux."
)

Parameters

url

Pushbullet API URL. Defaults to https://api.pushbullet.com/v2/pushes.

token

Pushbullet API token to use when interacting with Pushbullet. Defaults to "".

title

(Required) Title of the notification.

text

(Required) Text to display in the notification.

Examples

Send the last reported status to Pushbullet
import "pushbullet"
import "influxdata/influxdb/secrets"

token = secrets.get(key: "PUSHBULLET_TOKEN")

lastReported =
  from(bucket: "example-bucket")
    |> range(start: -1m)
    |> filter(fn: (r) => r._measurement == "statuses")
    |> last()
    |> tableFind(fn: (key) => true)
    |> getRecord(idx: 0)

pushbullet.pushNote(
  token: token,
  title: "Last reported status",
  text: "${lastReported._time}: ${lastReported.status}."
)

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.