{ "kind": "open-flow-workflow", "version": 1, "name": "GitHub Repository Alert Light", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_4e92dc662d405348": { "name": "Receive repository events", "kind": "integration", "config": { "events": { "kind": "value", "value": [ "*" ] }, "insecureSsl": { "kind": "value", "value": false }, "owner": { "kind": "value", "value": "example-owner" }, "repo": { "kind": "value", "value": "example-repository" } }, "definition": { "configInputs": [ { "jsonSchema": { "type": "array", "items": { "type": "string", "enum": [ "*", "branch_protection_configuration", "branch_protection_rule", "check_run", "check_suite", "code_scanning_alert", "commit_comment", "create", "custom_property_values", "delete", "dependabot_alert", "deploy_key", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issue_comment", "issue_dependencies", "issues", "label", "member", "meta", "milestone", "package", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "pull_request_review_thread", "push", "registry_package", "release", "repository", "repository_advisory", "repository_import", "repository_ruleset", "repository_vulnerability_alert", "secret_scanning_alert", "secret_scanning_alert_location", "secret_scanning_scan", "security_and_analysis", "star", "status", "sub_issues", "team_add", "watch", "workflow_job", "workflow_run" ] }, "minItems": 1, "uniqueItems": true }, "nullable": false, "handle": "events" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "insecureSsl", "value": false }, { "jsonSchema": { "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$" }, "nullable": false, "handle": "owner" }, { "jsonSchema": { "type": "string", "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$" }, "nullable": false, "handle": "repo" } ], "definitionVersion": 2, "description": "Triggers when selected GitHub webhook events occur in a repository.", "displayName": "Repository Event", "key": "github.on_repo_event", "name": "on_repo_event", "outputs": [ { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "deliveryId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "event" } ], "provider": "github", "type": "integration", "endpoint": { "body": { "allowArray": false, "allowEmpty": false, "formats": [ "json" ] }, "methods": [ "POST" ], "successStatus": 202 } } }, "n_d12715c7a0416e89": { "inputs": { "domain": { "kind": "value", "value": "light" }, "service": { "kind": "value", "value": "turn_on" }, "serviceData": { "kind": "value", "value": { "entity_id": "light.your_light", "rgb_color": [ 255, 0, 0 ] } }, "returnResponse": { "kind": "value", "value": false } }, "name": "Turn the alert light red", "kind": "task", "task": { "inputs": [ { "description": "The Home Assistant service domain, for example light or switch.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Home Assistant service domain, for example light or switch." }, "nullable": false, "handle": "domain" }, { "description": "The Home Assistant service name, for example turn_on or turn_off.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Home Assistant service name, for example turn_on or turn_off." }, "nullable": false, "handle": "service" }, { "description": "The JSON service data sent directly to Home Assistant, such as entity_id or brightness.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The JSON service data sent directly to Home Assistant, such as entity_id or brightness." }, "nullable": true, "handle": "serviceData", "value": null }, { "description": "Whether to request service response data with the return_response query parameter.", "jsonSchema": { "type": "boolean", "description": "Whether to request service response data with the return_response query parameter." }, "nullable": true, "handle": "returnResponse", "value": null } ], "outputs": [ { "description": "The Home Assistant states changed by the service call.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "entity_id": { "type": "string", "description": "The Home Assistant entity identifier." }, "state": { "type": "string", "description": "The current state value." }, "attributes": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The integration-specific attributes for the entity state." }, "last_changed": { "type": "string", "description": "The timestamp when the state last changed." }, "last_updated": { "type": "string", "description": "The timestamp when the state object was last updated." }, "context": { "type": "object", "properties": { "id": { "type": [ "string", "null" ], "description": "The Home Assistant context identifier." }, "parent_id": { "type": [ "string", "null" ], "description": "The optional parent context identifier." }, "user_id": { "type": [ "string", "null" ], "description": "The optional Home Assistant user identifier." } }, "additionalProperties": true, "description": "The Home Assistant context attached to a state change." } }, "additionalProperties": true, "description": "One Home Assistant entity state object." }, "description": "The Home Assistant states changed by the service call." }, "nullable": false, "handle": "changedStates" }, { "description": "The optional Home Assistant service response object.", "jsonSchema": { "type": [ "object", "null" ], "properties": {}, "additionalProperties": true, "description": "The optional Home Assistant service response object." }, "nullable": true, "handle": "serviceResponse" } ], "name": "Turn the alert light red", "executor": { "kind": "connector", "action": "home_assistant.call_service" } } }, "n_cb8cd6fbb79e25fd": { "name": "Home Assistant service result", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "entity_id": { "type": "string", "description": "The Home Assistant entity identifier." }, "state": { "type": "string", "description": "The current state value." }, "attributes": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The integration-specific attributes for the entity state." }, "last_changed": { "type": "string", "description": "The timestamp when the state last changed." }, "last_updated": { "type": "string", "description": "The timestamp when the state object was last updated." }, "context": { "type": "object", "properties": { "id": { "type": [ "string", "null" ], "description": "The Home Assistant context identifier." }, "parent_id": { "type": [ "string", "null" ], "description": "The optional parent context identifier." }, "user_id": { "type": [ "string", "null" ], "description": "The optional Home Assistant user identifier." } }, "additionalProperties": true, "description": "The Home Assistant context attached to a state change." } }, "additionalProperties": true, "description": "One Home Assistant entity state object." }, "description": "The Home Assistant states changed by the service call." }, "nullable": false, "handle": "changedStates" }, { "jsonSchema": { "type": [ "object", "null" ], "properties": {}, "additionalProperties": true, "description": "The optional Home Assistant service response object." }, "nullable": true, "handle": "serviceResponse" } ], "outputMappings": { "changedStates": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_d12715c7a0416e89", "output": "changedStates" } ] }, "serviceResponse": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_d12715c7a0416e89", "output": "serviceResponse" } ] } } } }, "edges": [ { "source": "n_4e92dc662d405348", "target": "n_d12715c7a0416e89" }, { "source": "n_d12715c7a0416e89", "target": "n_cb8cd6fbb79e25fd" } ] } }, "modules": {} }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }