{ "kind": "open-flow-workflow", "version": 1, "name": "Daily Weather Temperature to Pushover", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_454327cdd117b2ce": { "name": "Daily at 09:00 UTC", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "0 9 * * *", "timezone": "UTC" } ] }, "n_984ca759c4e392b3": { "inputs": { "q": { "kind": "value", "value": "berlin" }, "units": { "kind": "value", "value": "metric" } }, "name": "Get current weather", "kind": "task", "task": { "inputs": [ { "description": "The city name, optionally followed by state code and country code, such as London,GB.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The city name, optionally followed by state code and country code, such as London,GB." }, "nullable": true, "handle": "q", "value": null }, { "description": "The OpenWeather city identifier.", "jsonSchema": { "type": "integer", "minimum": 0, "description": "The OpenWeather city identifier." }, "nullable": true, "handle": "id", "value": null }, { "description": "The ZIP or postal code followed by country code, such as 94040,US.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The ZIP or postal code followed by country code, such as 94040,US." }, "nullable": true, "handle": "zip", "value": null }, { "description": "The latitude in decimal degrees.", "jsonSchema": { "type": "number", "minimum": -90, "maximum": 90, "description": "The latitude in decimal degrees." }, "nullable": true, "handle": "lat", "value": null }, { "description": "The longitude in decimal degrees.", "jsonSchema": { "type": "number", "minimum": -180, "maximum": 180, "description": "The longitude in decimal degrees." }, "nullable": true, "handle": "lon", "value": null }, { "description": "The units of measurement for the response.", "jsonSchema": { "type": "string", "enum": [ "standard", "metric", "imperial" ], "description": "The units of measurement for the response." }, "nullable": true, "handle": "units", "value": null }, { "description": "The response language code in ISO 639-1 format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The response language code in ISO 639-1 format." }, "nullable": true, "handle": "lang", "value": null } ], "outputs": [ { "description": "The current weather payload returned by OpenWeather.", "jsonSchema": { "type": "object", "properties": { "coord": { "type": "object", "properties": { "lon": { "type": "number", "description": "The longitude in decimal degrees." }, "lat": { "type": "number", "description": "The latitude in decimal degrees." } }, "required": [ "lon", "lat" ], "additionalProperties": true, "description": "The coordinates for the requested place." }, "weather": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The weather condition identifier." }, "main": { "type": "string", "description": "The group of weather parameters." }, "description": { "type": "string", "description": "The localized condition description." }, "icon": { "type": "string", "description": "The weather icon code." } }, "required": [ "id", "main", "description", "icon" ], "additionalProperties": true, "description": "A weather condition entry returned by OpenWeather." }, "description": "The weather conditions for the requested place." }, "base": { "type": "string", "description": "The internal base parameter returned by OpenWeather." }, "main": { "type": "object", "properties": { "temp": { "type": "number", "description": "The measured temperature." }, "feels_like": { "type": "number", "description": "The human-perceived temperature." }, "temp_min": { "type": "number", "description": "The minimum observed temperature." }, "temp_max": { "type": "number", "description": "The maximum observed temperature." }, "pressure": { "type": "number", "description": "The atmospheric pressure in hPa." }, "humidity": { "type": "number", "description": "The humidity percentage." }, "sea_level": { "type": "number", "description": "The sea-level pressure in hPa." }, "grnd_level": { "type": "number", "description": "The ground-level pressure in hPa." }, "temp_kf": { "type": "number", "description": "The internal forecast temperature correction." } }, "required": [ "temp", "feels_like", "temp_min", "temp_max", "pressure", "humidity" ], "additionalProperties": true, "description": "The main weather metrics." }, "visibility": { "type": "number", "description": "The visibility distance in metres." }, "wind": { "type": "object", "properties": { "speed": { "type": "number", "description": "The wind speed." }, "deg": { "type": "number", "description": "The wind direction in degrees." }, "gust": { "type": "number", "description": "The wind gust speed." } }, "required": [ "speed" ], "additionalProperties": true, "description": "The wind metrics." }, "rain": { "type": "object", "properties": { "1h": { "type": "number", "description": "The precipitation volume for the last hour." }, "3h": { "type": "number", "description": "The precipitation volume for the last three hours." } }, "additionalProperties": true, "description": "The rain volume summary." }, "snow": { "type": "object", "properties": { "1h": { "type": "number", "description": "The precipitation volume for the last hour." }, "3h": { "type": "number", "description": "The precipitation volume for the last three hours." } }, "additionalProperties": true, "description": "The snow volume summary." }, "clouds": { "type": "object", "properties": { "all": { "type": "number", "description": "The cloudiness percentage." } }, "required": [ "all" ], "additionalProperties": true, "description": "The cloud coverage summary." }, "dt": { "type": "integer", "minimum": 0, "description": "The calculation time as a Unix UTC timestamp." }, "sys": { "type": "object", "properties": { "type": { "type": "integer", "description": "The internal system type." }, "id": { "type": "integer", "description": "The internal system identifier." }, "country": { "type": "string", "description": "The ISO 3166 country code." }, "sunrise": { "type": "integer", "minimum": 0, "description": "The sunrise time as a Unix UTC timestamp." }, "sunset": { "type": "integer", "minimum": 0, "description": "The sunset time as a Unix UTC timestamp." } }, "required": [ "country", "sunrise", "sunset" ], "additionalProperties": true, "description": "The current weather system metadata." }, "timezone": { "type": "integer", "description": "The shift in seconds from UTC." }, "id": { "type": "integer", "description": "The OpenWeather city identifier." }, "name": { "type": "string", "description": "The place name returned by OpenWeather." }, "cod": { "type": "integer", "description": "The internal response code returned on success." } }, "required": [ "coord", "weather", "base", "main", "wind", "clouds", "dt", "sys", "timezone", "id", "name", "cod" ], "additionalProperties": true, "description": "The current weather payload returned by OpenWeather." }, "nullable": false, "handle": "output" } ], "name": "Get current weather", "executor": { "kind": "connector", "action": "openweather_api.get_current_weather", "outputMode": "value" } } }, "n_1086a3af6e6dc008": { "inputs": { "weather": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_984ca759c4e392b3", "output": "output" } ] } }, "name": "Format temperature", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "coord": { "type": "object", "properties": { "lon": { "type": "number", "description": "The longitude in decimal degrees." }, "lat": { "type": "number", "description": "The latitude in decimal degrees." } }, "required": [ "lon", "lat" ], "additionalProperties": true, "description": "The coordinates for the requested place." }, "weather": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The weather condition identifier." }, "main": { "type": "string", "description": "The group of weather parameters." }, "description": { "type": "string", "description": "The localized condition description." }, "icon": { "type": "string", "description": "The weather icon code." } }, "required": [ "id", "main", "description", "icon" ], "additionalProperties": true, "description": "A weather condition entry returned by OpenWeather." }, "description": "The weather conditions for the requested place." }, "base": { "type": "string", "description": "The internal base parameter returned by OpenWeather." }, "main": { "type": "object", "properties": { "temp": { "type": "number", "description": "The measured temperature." }, "feels_like": { "type": "number", "description": "The human-perceived temperature." }, "temp_min": { "type": "number", "description": "The minimum observed temperature." }, "temp_max": { "type": "number", "description": "The maximum observed temperature." }, "pressure": { "type": "number", "description": "The atmospheric pressure in hPa." }, "humidity": { "type": "number", "description": "The humidity percentage." }, "sea_level": { "type": "number", "description": "The sea-level pressure in hPa." }, "grnd_level": { "type": "number", "description": "The ground-level pressure in hPa." }, "temp_kf": { "type": "number", "description": "The internal forecast temperature correction." } }, "required": [ "temp", "feels_like", "temp_min", "temp_max", "pressure", "humidity" ], "additionalProperties": true, "description": "The main weather metrics." }, "visibility": { "type": "number", "description": "The visibility distance in metres." }, "wind": { "type": "object", "properties": { "speed": { "type": "number", "description": "The wind speed." }, "deg": { "type": "number", "description": "The wind direction in degrees." }, "gust": { "type": "number", "description": "The wind gust speed." } }, "required": [ "speed" ], "additionalProperties": true, "description": "The wind metrics." }, "rain": { "type": "object", "properties": { "1h": { "type": "number", "description": "The precipitation volume for the last hour." }, "3h": { "type": "number", "description": "The precipitation volume for the last three hours." } }, "additionalProperties": true, "description": "The rain volume summary." }, "snow": { "type": "object", "properties": { "1h": { "type": "number", "description": "The precipitation volume for the last hour." }, "3h": { "type": "number", "description": "The precipitation volume for the last three hours." } }, "additionalProperties": true, "description": "The snow volume summary." }, "clouds": { "type": "object", "properties": { "all": { "type": "number", "description": "The cloudiness percentage." } }, "required": [ "all" ], "additionalProperties": true, "description": "The cloud coverage summary." }, "dt": { "type": "integer", "minimum": 0, "description": "The calculation time as a Unix UTC timestamp." }, "sys": { "type": "object", "properties": { "type": { "type": "integer", "description": "The internal system type." }, "id": { "type": "integer", "description": "The internal system identifier." }, "country": { "type": "string", "description": "The ISO 3166 country code." }, "sunrise": { "type": "integer", "minimum": 0, "description": "The sunrise time as a Unix UTC timestamp." }, "sunset": { "type": "integer", "minimum": 0, "description": "The sunset time as a Unix UTC timestamp." } }, "required": [ "country", "sunrise", "sunset" ], "additionalProperties": true, "description": "The current weather system metadata." }, "timezone": { "type": "integer", "description": "The shift in seconds from UTC." }, "id": { "type": "integer", "description": "The OpenWeather city identifier." }, "name": { "type": "string", "description": "The place name returned by OpenWeather." }, "cod": { "type": "integer", "description": "The internal response code returned on success." } }, "required": [ "coord", "weather", "base", "main", "wind", "clouds", "dt", "sys", "timezone", "id", "name", "cod" ], "additionalProperties": true, "description": "The current weather payload returned by OpenWeather." }, "nullable": false, "handle": "weather" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "maxLength": 1024 }, "nullable": false, "handle": "message" } ], "name": "Format temperature", "moduleId": "n_f60eafba2ee88566", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_699bf7d5b9fea5dd": { "inputs": { "user": { "kind": "value", "value": "YOUR_PUSHOVER_USER_KEY" }, "message": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1086a3af6e6dc008", "output": "message" } ] }, "title": { "kind": "value", "value": "Today's Weather" }, "priority": { "kind": "value", "value": 0 } }, "name": "Send Pushover message", "kind": "task", "task": { "inputs": [ { "description": "Optional application API token override. When omitted, the connected application token is used.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Optional application API token override. When omitted, the connected application token is used." }, "nullable": true, "handle": "token", "value": null }, { "description": "Pushover user key or delivery group key.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Pushover user key or delivery group key." }, "nullable": false, "handle": "user" }, { "description": "Optional device name restriction for the target user.", "jsonSchema": { "type": "string", "maxLength": 100, "minLength": 1, "description": "Optional device name restriction for the target user." }, "nullable": true, "handle": "device", "value": null }, { "description": "Notification body text, limited to 1024 UTF-8 characters.", "jsonSchema": { "type": "string", "maxLength": 1024, "minLength": 1, "description": "Notification body text, limited to 1024 UTF-8 characters." }, "nullable": false, "handle": "message" }, { "description": "Optional message title shown above the notification body.", "jsonSchema": { "type": "string", "maxLength": 250, "minLength": 1, "description": "Optional message title shown above the notification body." }, "nullable": true, "handle": "title", "value": null }, { "description": "Optional supplementary URL shown with the message.", "jsonSchema": { "type": "string", "maxLength": 512, "format": "uri", "description": "Optional supplementary URL shown with the message." }, "nullable": true, "handle": "url", "value": null }, { "description": "Optional title shown for the supplementary URL.", "jsonSchema": { "type": "string", "maxLength": 100, "minLength": 1, "description": "Optional title shown for the supplementary URL." }, "nullable": true, "handle": "url_title", "value": null }, { "description": "Message priority: -2 lowest, -1 low, 0 normal, 1 high, 2 emergency.", "jsonSchema": { "type": "integer", "minimum": -2, "maximum": 2, "description": "Message priority: -2 lowest, -1 low, 0 normal, 1 high, 2 emergency." }, "nullable": true, "handle": "priority", "value": null }, { "description": "Time to live in seconds for the notification. Ignored for emergency messages.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Time to live in seconds for the notification. Ignored for emergency messages." }, "nullable": true, "handle": "ttl", "value": null }, { "description": "Seconds between retries for an emergency notification.", "jsonSchema": { "type": "integer", "minimum": 30, "description": "Seconds between retries for an emergency notification." }, "nullable": true, "handle": "retry", "value": null }, { "description": "Maximum number of seconds to keep retrying an emergency notification.", "jsonSchema": { "type": "integer", "maximum": 10800, "exclusiveMinimum": 0, "description": "Maximum number of seconds to keep retrying an emergency notification." }, "nullable": true, "handle": "expire", "value": null }, { "description": "Whether the notification body should be parsed as HTML.", "jsonSchema": { "type": "boolean", "description": "Whether the notification body should be parsed as HTML." }, "nullable": true, "handle": "html", "value": null }, { "description": "Whether the notification body should be rendered in a monospace font.", "jsonSchema": { "type": "boolean", "description": "Whether the notification body should be rendered in a monospace font." }, "nullable": true, "handle": "monospace", "value": null }, { "description": "Optional Unix timestamp displayed instead of the current time.", "jsonSchema": { "type": "integer", "minimum": 0, "description": "Optional Unix timestamp displayed instead of the current time." }, "nullable": true, "handle": "timestamp", "value": null }, { "description": "Optional callback URL invoked when an emergency notification is acknowledged.", "jsonSchema": { "type": "string", "format": "uri", "description": "Optional callback URL invoked when an emergency notification is acknowledged." }, "nullable": true, "handle": "callback", "value": null }, { "description": "Optional Pushover sound name used for the notification.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Optional Pushover sound name used for the notification." }, "nullable": true, "handle": "sound", "value": null }, { "description": "Optional comma-separated emergency tags stored with the receipt.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Optional comma-separated emergency tags stored with the receipt." }, "nullable": true, "handle": "tags", "value": null }, { "description": "Attachment stored in the configured transit bucket.", "jsonSchema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "description": "Filename used when uploading the attachment to Pushover." }, "mimetype": { "type": "string", "minLength": 1, "description": "MIME type reported for the attachment upload." }, "s3key": { "type": "string", "minLength": 1, "description": "Transit object key or absolute transit URL for a previously downloaded attachment." } }, "required": [ "name", "mimetype", "s3key" ], "additionalProperties": false, "description": "Attachment stored in the configured transit bucket." }, "nullable": true, "handle": "attachment", "value": null }, { "description": "MIME type for the inline base64 attachment.", "jsonSchema": { "type": "string", "minLength": 1, "description": "MIME type for the inline base64 attachment." }, "nullable": true, "handle": "attachment_type", "value": null }, { "description": "Base64-encoded image attachment content.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Base64-encoded image attachment content." }, "nullable": true, "handle": "attachment_base64", "value": null } ], "outputs": [ { "description": "Response returned after sending a Pushover notification.", "jsonSchema": { "type": "object", "additionalProperties": true, "description": "Response returned after sending a Pushover notification.", "properties": { "status": { "type": "integer", "description": "Pushover status code. Successful requests return 1." }, "request": { "type": "string", "description": "Unique request identifier returned by Pushover." }, "errors": { "type": "array", "items": { "type": "string", "description": "One error message returned by Pushover." }, "description": "Error messages returned by Pushover when the request fails." }, "receipt": { "type": "string", "description": "Receipt identifier returned for emergency notifications." }, "parameter_flags": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Additional parameter flags returned by Pushover for the request." } }, "required": [ "status", "request" ] }, "nullable": false, "handle": "output" } ], "name": "Send Pushover message", "executor": { "kind": "connector", "action": "pushover.send_message", "outputMode": "value" } } } }, "edges": [ { "source": "n_454327cdd117b2ce", "target": "n_984ca759c4e392b3" }, { "source": "n_984ca759c4e392b3", "target": "n_1086a3af6e6dc008" }, { "source": "n_1086a3af6e6dc008", "target": "n_699bf7d5b9fea5dd" } ] } }, "modules": { "n_f60eafba2ee88566": { "name": "Format temperature", "imports": [], "source": "export default function weatherMessage({weather}){if(weather?.cod!==200||typeof weather?.main?.temp!=='number'||!Number.isFinite(weather.main.temp))throw Error('OpenWeather response has no current temperature');return{message:`Hey! The temperature outside is ${weather.main.temp}°C.`}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }