pushbullet.pushNote() function
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}.",
)
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.