{ "kind": "open-flow-workflow", "version": 1, "name": "Current City Weather", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_972e6df05659a003": { "name": "Read configured city weather", "kind": "start", "inputDefs": [] }, "n_49a2a7489ff615cf": { "inputs": { "q": { "kind": "value", "value": "berlin,de" }, "units": { "kind": "value", "value": "metric" } }, "name": "Read 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": "Read current weather", "executor": { "kind": "connector", "action": "openweather_api.get_current_weather", "outputMode": "value" } } }, "n_43e712dd3de66bca": { "inputs": { "weather": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_49a2a7489ff615cf", "output": "output" } ] } }, "name": "Check current-weather success", "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": "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" } ], "name": "Check current-weather success", "moduleId": "n_0020bc8718e1cbee", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_752802eb227d37fd": { "name": "Complete current-weather record", "kind": "outputs", "outputDefs": [ { "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" } ], "outputMappings": { "weather": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_43e712dd3de66bca", "output": "weather" } ] } } } }, "edges": [ { "source": "n_972e6df05659a003", "target": "n_49a2a7489ff615cf" }, { "source": "n_49a2a7489ff615cf", "target": "n_43e712dd3de66bca" }, { "source": "n_43e712dd3de66bca", "target": "n_752802eb227d37fd" } ] } }, "modules": { "n_0020bc8718e1cbee": { "name": "Check current-weather success", "imports": [], "source": "export default function currentCityWeather({ weather }) {\n if (!weather || typeof weather !== 'object' || Array.isArray(weather) || weather.cod !== 200) {\n throw new Error('OpenWeather did not return a successful current-weather record');\n }\n return { weather };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }