Documentation

pushbullet.pushNote() function

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

Function type: Output

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.

Data type: String

token

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

Data type: String

title

Required
Title of the notification.

Data type: String

text

Required
Text to display in the notification.

Data type: String

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}."
)

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: