{ "kind": "open-flow-workflow", "version": 1, "name": "Monitor Sheet URLs to Telegram", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_c39a079f2f477a85": { "name": "Every minute", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "* * * * *", "timezone": "UTC" } ] }, "n_5cfa7ee31bfcafea": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_SPREADSHEET_ID" }, "range": { "kind": "value", "value": "'Sheet1'!A:Z" }, "majorDimension": { "kind": "value", "value": "ROWS" }, "valueRenderOption": { "kind": "value", "value": "UNFORMATTED_VALUE" } }, "name": "Read the URL list", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to retrieve.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to retrieve." }, "nullable": false, "handle": "range" }, { "description": "The major dimension for the returned values.", "jsonSchema": { "type": "string", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension for the returned values." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How values should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be rendered in the output." }, "nullable": true, "handle": "valueRenderOption", "value": null }, { "description": "How dates and times should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates and times should be rendered in the output." }, "nullable": true, "handle": "dateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The A1 notation of the range.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range." }, "nullable": false, "handle": "range" }, { "description": "The major dimension of the values (ROWS or COLUMNS).", "jsonSchema": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "nullable": false, "handle": "majorDimension" }, { "description": "The data values in the range.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "name": "Read the URL list", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_1b259b92fcfad6ae": { "inputs": { "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_5cfa7ee31bfcafea", "output": "values" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "state" } ] } }, "name": "Prepare the next URL", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "name": "Prepare the next URL", "moduleId": "n_ad88a9e3eaad80ea", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_e124b7a1388ba7ff": { "inputs": {}, "name": "More URLs to check?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "check", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_bb1cce87de736ca2": { "inputs": { "initialUrl": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "url" } ] }, "index": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "count" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_de154df84677f3dc", "output": "state" } ] } }, "name": "Prepare the HTTP target", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "initialUrl" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "index" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "name": "Prepare the HTTP target", "moduleId": "n_0ce92a005a83b288", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_2205a99bea5189a8": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_bb1cce87de736ca2", "output": "url" } ] } }, "name": "Check the URL", "onError": "error", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Check the URL", "executor": { "method": "GET", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "none", "authentication": { "type": "none" }, "responseFormat": "text", "statusPolicy": "all", "kind": "http-request" } } }, "n_9b34fcc77b931bd5": { "inputs": {}, "name": "Did the request complete?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "response", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_2205a99bea5189a8", "output": "error", "system": true } }, "operator": "isNull" } ] } ] } ] }, "n_de154df84677f3dc": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_bb1cce87de736ca2", "output": "url" } ] }, "index": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "count" } ] }, "status": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2205a99bea5189a8", "output": "statusCode" } ] }, "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2205a99bea5189a8", "output": "headers" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_de154df84677f3dc", "output": "state" } ] } }, "name": "Evaluate the response", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "index" }, { "jsonSchema": { "type": "integer" }, "nullable": true, "handle": "status" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": true, "handle": "headers" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "redirect" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "alive" } ], "name": "Evaluate the response", "moduleId": "n_8a1b6a74a5c7fee9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_1e8fb47f8ff31f86": { "inputs": {}, "name": "Follow a redirect?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "follow", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_de154df84677f3dc", "output": "redirect" } }, "operator": "isTrue" } ] } ] } ] }, "n_be5b306b1bff5efb": { "inputs": {}, "name": "Did the URL succeed?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "alive", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_de154df84677f3dc", "output": "alive" } }, "operator": "isTrue" } ] } ] } ] }, "n_a29daeeb9867ea41": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "url" } ] } }, "name": "Prepare the alert", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "maxLength": 4096 }, "nullable": false, "handle": "text" } ], "name": "Prepare the alert", "moduleId": "n_fe0f811dad92484c", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_2b1679ce8f87ce7b": { "inputs": { "chatId": { "kind": "value", "value": "YOUR_TELEGRAM_CHAT_ID" }, "text": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a29daeeb9867ea41", "output": "text" } ] }, "parseMode": { "kind": "value", "value": "Markdown" } }, "name": "Send the Telegram alert", "kind": "task", "task": { "inputs": [ { "description": "The target Telegram chat ID or channel username.", "jsonSchema": { "anyOf": [ { "type": "integer", "description": "A numeric Telegram chat identifier." }, { "type": "string", "pattern": "^-?[0-9]+$", "description": "A numeric Telegram chat identifier encoded as a string." }, { "type": "string", "pattern": "^@[A-Za-z0-9_]+$", "description": "A Telegram @username that identifies a public chat or channel." } ], "description": "The target Telegram chat ID or channel username." }, "nullable": false, "handle": "chatId" }, { "description": "The text of the message to send.", "jsonSchema": { "type": "string", "maxLength": 4096, "minLength": 1, "description": "The text of the message to send." }, "nullable": false, "handle": "text" }, { "description": "The unique identifier of the Telegram business connection.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The unique identifier of the Telegram business connection." }, "nullable": true, "handle": "businessConnectionId", "value": null }, { "description": "The parse mode used for message entities.", "jsonSchema": { "type": "string", "enum": [ "Markdown", "MarkdownV2", "HTML" ], "description": "The parse mode used for message entities." }, "nullable": true, "handle": "parseMode", "value": null }, { "description": "Whether to send the message silently.", "jsonSchema": { "type": "boolean", "description": "Whether to send the message silently." }, "nullable": true, "handle": "disableNotification", "value": null }, { "description": "Whether to protect the sent message from forwarding and saving.", "jsonSchema": { "type": "boolean", "description": "Whether to protect the sent message from forwarding and saving." }, "nullable": true, "handle": "protectContent", "value": null }, { "description": "Whether to disable link previews in the message.", "jsonSchema": { "type": "boolean", "description": "Whether to disable link previews in the message." }, "nullable": true, "handle": "disableWebPagePreview", "value": null }, { "description": "The forum topic ID for the target message thread.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "The forum topic ID for the target message thread." }, "nullable": true, "handle": "messageThreadId", "value": null }, { "description": "The message ID to reply to.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "The message ID to reply to." }, "nullable": true, "handle": "replyToMessageId", "value": null } ], "outputs": [ { "description": "A normalized Telegram message record.", "jsonSchema": { "type": "object", "properties": { "messageId": { "type": "integer", "description": "The unique message identifier inside the chat." }, "date": { "type": "integer", "description": "The Unix timestamp when the message was sent." }, "chat": { "type": "object", "properties": { "id": { "type": "integer", "description": "The unique identifier of the chat." }, "type": { "type": "string", "description": "The chat type." }, "title": { "type": "string", "description": "The chat title." }, "username": { "type": "string", "description": "The public username of the chat." }, "firstName": { "type": "string", "description": "The first name for a private chat counterpart." }, "lastName": { "type": "string", "description": "The last name for a private chat counterpart." } }, "required": [ "id", "type" ], "additionalProperties": true, "description": "A Telegram chat record." }, "businessConnectionId": { "type": "string", "minLength": 1, "description": "The unique identifier of the Telegram business connection." }, "from": { "type": "object", "properties": { "id": { "type": "integer", "description": "The unique identifier of the user or bot." }, "isBot": { "type": "boolean", "description": "Whether the account is a bot." }, "firstName": { "type": "string", "description": "The first name of the user or bot." }, "username": { "type": "string", "description": "The username of the user or bot." } }, "required": [ "id", "isBot", "firstName" ], "additionalProperties": true, "description": "A Telegram user record." }, "senderChat": { "type": "object", "properties": { "id": { "type": "integer", "description": "The unique identifier of the chat." }, "type": { "type": "string", "description": "The chat type." }, "title": { "type": "string", "description": "The chat title." }, "username": { "type": "string", "description": "The public username of the chat." }, "firstName": { "type": "string", "description": "The first name for a private chat counterpart." }, "lastName": { "type": "string", "description": "The last name for a private chat counterpart." } }, "required": [ "id", "type" ], "additionalProperties": true, "description": "A Telegram chat record." }, "text": { "type": "string", "description": "The message text, when present." }, "caption": { "type": "string", "description": "The media caption, when present." }, "photo": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the photo." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the photo." }, "width": { "type": "integer", "description": "The photo width in pixels." }, "height": { "type": "integer", "description": "The photo height in pixels." }, "fileSize": { "type": "integer", "description": "The photo file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height" ], "additionalProperties": true, "description": "A Telegram photo or thumbnail size." }, "description": "The available sizes of the attached photo." }, "document": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the document." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the document." }, "fileName": { "type": "string", "description": "The original document filename." }, "mimeType": { "type": "string", "description": "The MIME type of the document." }, "fileSize": { "type": "integer", "description": "The document file size in bytes." } }, "required": [ "fileId", "fileUniqueId" ], "additionalProperties": true, "description": "A Telegram document file." }, "location": { "type": "object", "properties": { "latitude": { "type": "number", "description": "The latitude of the location." }, "longitude": { "type": "number", "description": "The longitude of the location." }, "horizontalAccuracy": { "type": "number", "description": "The radius of uncertainty in meters." }, "livePeriod": { "type": "integer", "description": "The live location update period in seconds." }, "heading": { "type": "integer", "description": "The direction of travel in degrees." }, "proximityAlertRadius": { "type": "integer", "description": "The proximity alert radius in meters." } }, "required": [ "latitude", "longitude" ], "additionalProperties": true, "description": "A Telegram geographic location." }, "poll": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique poll identifier." }, "question": { "type": "string", "description": "The poll question." }, "options": { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "description": "The poll option text." }, "voterCount": { "type": "integer", "description": "The number of votes for the option." } }, "required": [ "text", "voterCount" ], "additionalProperties": true, "description": "A Telegram poll option." }, "description": "The available poll options." }, "totalVoterCount": { "type": "integer", "description": "The total number of poll voters." }, "isClosed": { "type": "boolean", "description": "Whether the poll is closed." }, "isAnonymous": { "type": "boolean", "description": "Whether the poll is anonymous." }, "type": { "type": "string", "enum": [ "regular", "quiz" ], "description": "The poll type." }, "allowsMultipleAnswers": { "type": "boolean", "description": "Whether the poll allows multiple answers." }, "closeDate": { "type": "integer", "description": "The Unix timestamp when the poll closes." }, "openPeriod": { "type": "integer", "description": "The number of seconds the poll remains open." }, "explanation": { "type": "string", "description": "The explanation shown for a quiz poll." }, "correctOptionId": { "type": "integer", "description": "The zero-based identifier of the correct quiz option." } }, "required": [ "id", "question", "options", "totalVoterCount", "isClosed", "isAnonymous", "type", "allowsMultipleAnswers" ], "additionalProperties": true, "description": "A Telegram poll." }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Telegram MessageEntity object." }, "description": "The entities parsed from the message text." }, "captionEntities": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Telegram MessageEntity object." }, "description": "The entities parsed from the media caption." }, "forwardDate": { "type": "integer", "description": "The Unix timestamp of the original forwarded message." }, "forwardFrom": { "type": "object", "properties": { "id": { "type": "integer", "description": "The unique identifier of the user or bot." }, "isBot": { "type": "boolean", "description": "Whether the account is a bot." }, "firstName": { "type": "string", "description": "The first name of the user or bot." }, "username": { "type": "string", "description": "The username of the user or bot." } }, "required": [ "id", "isBot", "firstName" ], "additionalProperties": true, "description": "A Telegram user record." }, "forwardFromChat": { "type": "object", "properties": { "id": { "type": "integer", "description": "The unique identifier of the chat." }, "type": { "type": "string", "description": "The chat type." }, "title": { "type": "string", "description": "The chat title." }, "username": { "type": "string", "description": "The public username of the chat." }, "firstName": { "type": "string", "description": "The first name for a private chat counterpart." }, "lastName": { "type": "string", "description": "The last name for a private chat counterpart." } }, "required": [ "id", "type" ], "additionalProperties": true, "description": "A Telegram chat record." }, "forwardFromMessageId": { "type": "integer", "description": "The original message identifier inside the source chat." }, "forwardSignature": { "type": "string", "description": "The original author signature for a forwarded channel post." }, "forwardSenderName": { "type": "string", "description": "The display name of a forwarded sender who disallows linking." }, "linkPreviewOptions": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The link preview options attached to the message." }, "video": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the video." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the video." }, "width": { "type": "integer", "description": "The video width in pixels." }, "height": { "type": "integer", "description": "The video height in pixels." }, "duration": { "type": "integer", "description": "The video duration in seconds." }, "thumbnail": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the photo." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the photo." }, "width": { "type": "integer", "description": "The photo width in pixels." }, "height": { "type": "integer", "description": "The photo height in pixels." }, "fileSize": { "type": "integer", "description": "The photo file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height" ], "additionalProperties": true, "description": "A Telegram photo or thumbnail size." }, "cover": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the photo." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the photo." }, "width": { "type": "integer", "description": "The photo width in pixels." }, "height": { "type": "integer", "description": "The photo height in pixels." }, "fileSize": { "type": "integer", "description": "The photo file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height" ], "additionalProperties": true, "description": "A Telegram photo or thumbnail size." }, "description": "The available sizes of the video cover." }, "startTimestamp": { "type": "integer", "description": "The start timestamp for the video in the message." }, "qualities": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse this video quality." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of this video quality." }, "width": { "type": "integer", "description": "The video width in pixels." }, "height": { "type": "integer", "description": "The video height in pixels." }, "codec": { "type": "string", "description": "The codec used to encode the video." }, "fileSize": { "type": "integer", "description": "The video quality file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height", "codec" ], "additionalProperties": true, "description": "A Telegram video file at one available quality." }, "description": "The available encoded video qualities." }, "fileName": { "type": "string", "description": "The original video filename." }, "mimeType": { "type": "string", "description": "The MIME type of the video." }, "fileSize": { "type": "integer", "description": "The video file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height", "duration" ], "additionalProperties": true, "description": "A Telegram video file." }, "audio": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the audio." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the audio." }, "duration": { "type": "integer", "description": "The audio duration in seconds." }, "performer": { "type": "string", "description": "The performer of the audio." }, "title": { "type": "string", "description": "The audio track title." }, "fileName": { "type": "string", "description": "The original audio filename." }, "mimeType": { "type": "string", "description": "The MIME type of the audio." }, "fileSize": { "type": "integer", "description": "The audio file size in bytes." }, "thumbnail": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the photo." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the photo." }, "width": { "type": "integer", "description": "The photo width in pixels." }, "height": { "type": "integer", "description": "The photo height in pixels." }, "fileSize": { "type": "integer", "description": "The photo file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height" ], "additionalProperties": true, "description": "A Telegram photo or thumbnail size." } }, "required": [ "fileId", "fileUniqueId", "duration" ], "additionalProperties": true, "description": "A Telegram audio file." }, "voice": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the voice message." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the voice message." }, "duration": { "type": "integer", "description": "The voice message duration in seconds." }, "mimeType": { "type": "string", "description": "The MIME type of the voice message." }, "fileSize": { "type": "integer", "description": "The voice message file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "duration" ], "additionalProperties": true, "description": "A Telegram voice message file." }, "animation": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the animation." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the animation." }, "width": { "type": "integer", "description": "The animation width in pixels." }, "height": { "type": "integer", "description": "The animation height in pixels." }, "duration": { "type": "integer", "description": "The animation duration in seconds." }, "thumbnail": { "type": "object", "properties": { "fileId": { "type": "string", "description": "The file identifier used to download or reuse the photo." }, "fileUniqueId": { "type": "string", "description": "The stable unique identifier of the photo." }, "width": { "type": "integer", "description": "The photo width in pixels." }, "height": { "type": "integer", "description": "The photo height in pixels." }, "fileSize": { "type": "integer", "description": "The photo file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height" ], "additionalProperties": true, "description": "A Telegram photo or thumbnail size." }, "fileName": { "type": "string", "description": "The original animation filename." }, "mimeType": { "type": "string", "description": "The MIME type of the animation." }, "fileSize": { "type": "integer", "description": "The animation file size in bytes." } }, "required": [ "fileId", "fileUniqueId", "width", "height", "duration" ], "additionalProperties": true, "description": "A Telegram animation file." }, "contact": { "type": "object", "properties": { "phoneNumber": { "type": "string", "description": "The contact phone number." }, "firstName": { "type": "string", "description": "The contact first name." }, "lastName": { "type": "string", "description": "The contact last name." }, "userId": { "type": "integer", "description": "The Telegram user identifier associated with the contact." }, "vcard": { "type": "string", "description": "Additional contact data in vCard format." } }, "required": [ "phoneNumber", "firstName" ], "additionalProperties": true, "description": "A Telegram contact." }, "venue": { "type": "object", "properties": { "location": { "type": "object", "properties": { "latitude": { "type": "number", "description": "The latitude of the location." }, "longitude": { "type": "number", "description": "The longitude of the location." }, "horizontalAccuracy": { "type": "number", "description": "The radius of uncertainty in meters." }, "livePeriod": { "type": "integer", "description": "The live location update period in seconds." }, "heading": { "type": "integer", "description": "The direction of travel in degrees." }, "proximityAlertRadius": { "type": "integer", "description": "The proximity alert radius in meters." } }, "required": [ "latitude", "longitude" ], "additionalProperties": true, "description": "A Telegram geographic location." }, "title": { "type": "string", "description": "The venue name." }, "address": { "type": "string", "description": "The venue address." }, "foursquareId": { "type": "string", "description": "The Foursquare place identifier." }, "foursquareType": { "type": "string", "description": "The Foursquare place type." }, "googlePlaceId": { "type": "string", "description": "The Google Places identifier." }, "googlePlaceType": { "type": "string", "description": "The Google Places type." } }, "required": [ "location", "title", "address" ], "additionalProperties": true, "description": "A Telegram venue." }, "dice": { "type": "object", "properties": { "emoji": { "type": "string", "description": "The emoji used for the animation." }, "value": { "type": "integer", "description": "The generated dice value." } }, "required": [ "emoji", "value" ], "additionalProperties": true, "description": "A Telegram animated dice result." } }, "required": [ "messageId", "date", "chat" ], "additionalProperties": true, "description": "A normalized Telegram message record." }, "nullable": false, "handle": "output" } ], "name": "Send the Telegram alert", "executor": { "kind": "connector", "action": "telegram.send_message", "outputMode": "value" } } }, "n_f9d4afadb44dfe21": { "name": "Checked URL count", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "outputMappings": { "count": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b259b92fcfad6ae", "output": "count" } ] } } } }, "edges": [ { "source": "n_c39a079f2f477a85", "target": "n_5cfa7ee31bfcafea" }, { "source": "n_5cfa7ee31bfcafea", "target": "n_1b259b92fcfad6ae" }, { "source": "n_1b259b92fcfad6ae", "target": "n_e124b7a1388ba7ff" }, { "source": "n_e124b7a1388ba7ff", "target": "n_bb1cce87de736ca2", "sourceHandle": "check" }, { "source": "n_bb1cce87de736ca2", "target": "n_2205a99bea5189a8" }, { "source": "n_2205a99bea5189a8", "target": "n_9b34fcc77b931bd5" }, { "source": "n_9b34fcc77b931bd5", "target": "n_de154df84677f3dc", "sourceHandle": "response" }, { "source": "n_9b34fcc77b931bd5", "target": "n_a29daeeb9867ea41", "sourceHandle": "otherwise" }, { "source": "n_de154df84677f3dc", "target": "n_1e8fb47f8ff31f86" }, { "source": "n_1e8fb47f8ff31f86", "target": "n_bb1cce87de736ca2", "sourceHandle": "follow" }, { "source": "n_1e8fb47f8ff31f86", "target": "n_be5b306b1bff5efb", "sourceHandle": "otherwise" }, { "source": "n_be5b306b1bff5efb", "target": "n_1b259b92fcfad6ae", "sourceHandle": "alive" }, { "source": "n_be5b306b1bff5efb", "target": "n_a29daeeb9867ea41", "sourceHandle": "otherwise" }, { "source": "n_a29daeeb9867ea41", "target": "n_2b1679ce8f87ce7b" }, { "source": "n_2b1679ce8f87ce7b", "target": "n_1b259b92fcfad6ae" }, { "source": "n_e124b7a1388ba7ff", "target": "n_f9d4afadb44dfe21", "sourceHandle": "otherwise" } ] } }, "modules": { "n_ad88a9e3eaad80ea": { "name": "Prepare the next URL", "imports": [], "source": "export default function nextUrl({values,previousState}) {\n if(!Array.isArray(values)) throw Error('Invalid URL sheet');\n const index=previousState?.index??0;\n if(!Number.isInteger(index)||index<0) throw Error('Invalid monitor state');\n if(values.length===0) return {state:{index:0},more:false,url:'https://unused.invalid',count:0};\n const header=values[0]; if(!Array.isArray(header)||header.filter(x=>x==='URLS').length!==1) throw Error('Sheet needs one URLS header');\n const column=header.indexOf('URLS'); const rows=values.slice(1).filter(row=>Array.isArray(row)&&row.some(x=>x!==''&&x!==null));\n if(index>=rows.length) return {state:{index},more:false,url:'https://unused.invalid',count:index};\n const url=rows[index][column]; if(typeof url!=='string'||!url.trim()||/[\\r\\n]/.test(url)) throw Error('Every row needs a URL');\n if(!/^https?:\\/\\/[^\\/?#@\\s]+(?:[\\/?#][^\\s]*)?$/i.test(url)) throw Error('Every URL must be HTTP or HTTPS without credentials');\n return {state:{index:index+1},more:true,url,count:index+1};\n}\n" }, "n_0ce92a005a83b288": { "name": "Prepare the HTTP target", "imports": [], "source": "export default function serverHop({initialUrl,index,previousState}) {\n return {url:previousState?.index===index&&previousState?.nextUrl?previousState.nextUrl:initialUrl};\n}\n" }, "n_8a1b6a74a5c7fee9": { "name": "Evaluate the response", "imports": [], "source": "export default function assessServer({url,index,status,headers,previousState}) {\n const prior=previousState?.index===index?previousState.hops:0;if(!Number.isInteger(prior)||prior<0)throw Error('Invalid redirect state');\n if((status>=300&&status<400)&&typeof headers?.location==='string'&&headers.location){\n if(prior>=21)return {state:{index,hops:prior,nextUrl:''},redirect:false,alive:false};\n try{const target=new URL(headers.location,url);if(!['http:','https:'].includes(target.protocol)||target.username||target.password)throw Error();return{state:{index,hops:prior+1,nextUrl:target.toString()},redirect:true,alive:false};}catch{return {state:{index,hops:prior,nextUrl:''},redirect:false,alive:false};}\n }\n return {state:{index,hops:prior,nextUrl:''},redirect:false,alive:status>=200&&status<300};\n}\n" }, "n_fe0f811dad92484c": { "name": "Prepare the alert", "imports": [], "source": "export default function message({url}) {\n const text=`Health Check : ${url}\\n\\nHTTP request failed`;\n if(text.length>4096) throw Error('Telegram message exceeds 4096 characters');\n return {text};\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }