{ "kind": "open-flow-workflow", "version": 1, "name": "GitHub Issues to Telegram", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_8928088007ac9548": { "name": "Check issues every ten minutes", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "*/10 * * * *", "timezone": "UTC" } ] }, "n_4840788d139a3aa8": { "inputs": {}, "name": "Select last thirty minutes", "kind": "task", "task": { "inputs": [], "outputs": [ { "jsonSchema": { "type": "string", "format": "date-time" }, "nullable": false, "handle": "since" } ], "name": "Select last thirty minutes", "moduleId": "n_45918670b097b275", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_e8b034325256823d": { "inputs": { "owner": { "kind": "value", "value": "YOUR_GITHUB_OWNER" }, "repo": { "kind": "value", "value": "YOUR_GITHUB_REPO" }, "state": { "kind": "value", "value": "open" }, "labels": { "kind": "value", "value": [ "Bug" ] }, "since": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_4840788d139a3aa8", "output": "since" } ] }, "perPage": { "kind": "value", "value": 50 }, "page": { "kind": "value", "value": 1 } }, "name": "Read open Bug issues", "kind": "task", "task": { "inputs": [ { "description": "The repository owner.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The repository owner." }, "nullable": false, "handle": "owner" }, { "description": "The repository name.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The repository name." }, "nullable": false, "handle": "repo" }, { "description": "The issue state filter.", "jsonSchema": { "type": "string", "enum": [ "open", "closed", "all" ], "description": "The issue state filter." }, "nullable": true, "handle": "state", "value": null }, { "description": "The labels to filter by.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A label name." }, "description": "The labels to filter by." }, "nullable": true, "handle": "labels", "value": null }, { "description": "The sort field.", "jsonSchema": { "type": "string", "enum": [ "created", "updated", "comments" ], "description": "The sort field." }, "nullable": true, "handle": "sort", "value": null }, { "description": "The sort direction.", "jsonSchema": { "type": "string", "enum": [ "asc", "desc" ], "description": "The sort direction." }, "nullable": true, "handle": "direction", "value": null }, { "description": "The ISO 8601 date to filter issues updated after.", "jsonSchema": { "type": "string", "description": "The ISO 8601 date to filter issues updated after." }, "nullable": true, "handle": "since", "value": null }, { "description": "The number of raw GitHub results requested per page. Defaults to 30.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The number of raw GitHub results requested per page. Defaults to 30." }, "nullable": true, "handle": "perPage", "value": null }, { "description": "The page number to fetch.", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The page number to fetch." }, "nullable": true, "handle": "page", "value": null } ], "outputs": [ { "description": "The list of issues.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The issue ID." }, "number": { "type": "integer", "description": "The issue number." }, "title": { "type": "string", "description": "The issue title." }, "state": { "type": "string", "description": "The issue state." }, "html_url": { "type": "string", "description": "The issue URL." }, "body": { "type": [ "string", "null" ], "description": "The issue body." }, "comments": { "type": "integer", "description": "The number of comments." }, "user": { "type": "object", "properties": { "id": { "type": "integer", "description": "The user ID." }, "login": { "type": "string", "description": "The username." }, "avatar_url": { "type": "string", "description": "The avatar URL." }, "html_url": { "type": "string", "description": "The profile URL." }, "type": { "type": "string", "description": "The account type." } }, "required": [ "id", "login" ], "additionalProperties": true, "description": "The issue author." }, "assignees": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The user ID." }, "login": { "type": "string", "description": "The username." }, "avatar_url": { "type": "string", "description": "The avatar URL." }, "html_url": { "type": "string", "description": "The profile URL." }, "type": { "type": "string", "description": "The account type." } }, "required": [ "id", "login" ], "additionalProperties": true, "description": "A GitHub user summary." }, "description": "The assigned users." }, "labels": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "integer", "description": "The label ID." }, "name": { "type": "string", "description": "The label name." }, "color": { "type": "string", "description": "The label color hex code." }, "description": { "type": [ "string", "null" ], "description": "The label description." } }, "required": [ "name" ], "additionalProperties": true, "description": "A GitHub label record." }, { "type": "string", "description": "A union variant." } ], "description": "An array item." }, "description": "The issue labels." }, "pull_request": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The linked pull request metadata." } }, "required": [ "id", "number", "title", "state", "html_url" ], "additionalProperties": true, "description": "A GitHub issue record." }, "description": "The list of issues." }, "nullable": false, "handle": "issues" }, { "description": "Pagination signals from the raw GitHub page before filtering.", "jsonSchema": { "type": "object", "properties": { "fetched": { "type": "integer", "minimum": 0, "description": "The number of items GitHub returned before filtering pull requests. Continue paginating while it equals perPage." } }, "required": [ "fetched" ], "additionalProperties": false, "description": "Pagination signals from the raw GitHub page before filtering." }, "nullable": false, "handle": "pageInfo" } ], "name": "Read open Bug issues", "executor": { "kind": "connector", "action": "github.list_repository_issues" } } }, "n_009f59f49f5b5e31": { "inputs": { "issues": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_e8b034325256823d", "output": "issues" } ] } }, "name": "Select issues with few comments", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The issue ID." }, "number": { "type": "integer", "description": "The issue number." }, "title": { "type": "string", "description": "The issue title." }, "state": { "type": "string", "description": "The issue state." }, "html_url": { "type": "string", "description": "The issue URL." }, "body": { "type": [ "string", "null" ], "description": "The issue body." }, "comments": { "type": "integer", "description": "The number of comments." }, "user": { "type": "object", "properties": { "id": { "type": "integer", "description": "The user ID." }, "login": { "type": "string", "description": "The username." }, "avatar_url": { "type": "string", "description": "The avatar URL." }, "html_url": { "type": "string", "description": "The profile URL." }, "type": { "type": "string", "description": "The account type." } }, "required": [ "id", "login" ], "additionalProperties": true, "description": "The issue author." }, "assignees": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The user ID." }, "login": { "type": "string", "description": "The username." }, "avatar_url": { "type": "string", "description": "The avatar URL." }, "html_url": { "type": "string", "description": "The profile URL." }, "type": { "type": "string", "description": "The account type." } }, "required": [ "id", "login" ], "additionalProperties": true, "description": "A GitHub user summary." }, "description": "The assigned users." }, "labels": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "integer", "description": "The label ID." }, "name": { "type": "string", "description": "The label name." }, "color": { "type": "string", "description": "The label color hex code." }, "description": { "type": [ "string", "null" ], "description": "The label description." } }, "required": [ "name" ], "additionalProperties": true, "description": "A GitHub label record." }, { "type": "string", "description": "A union variant." } ], "description": "An array item." }, "description": "The issue labels." }, "pull_request": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The linked pull request metadata." } }, "required": [ "id", "number", "title", "state", "html_url" ], "additionalProperties": true, "description": "A GitHub issue record." }, "description": "The list of issues." }, "nullable": false, "handle": "issues" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 4096, "minLength": 1, "description": "The text of the message to send." }, "sourceIndex": { "type": "integer", "minimum": 0 } }, "required": [ "text", "sourceIndex" ], "additionalProperties": false } }, "nullable": false, "handle": "notifications" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "name": "Select issues with few comments", "moduleId": "n_5b0cf0fd656aa541", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_19179ccd8bf8df01": { "inputs": {}, "name": "Has matching issues", "kind": "condition", "matchMode": "first", "cases": [ { "output": "issues", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_009f59f49f5b5e31", "output": "count" } }, "operator": ">", "right": { "kind": "value", "value": 0 } } ] } ] } ] }, "n_f0aa4960df7f4474": { "inputs": { "notifications": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_009f59f49f5b5e31", "output": "notifications" } ] }, "chatId": { "kind": "value", "value": "@YOUR_TELEGRAM_CHANNEL" } }, "name": "Send issue alerts in order", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 4096, "minLength": 1, "description": "The text of the message to send." }, "sourceIndex": { "type": "integer", "minimum": 0 } }, "required": [ "text", "sourceIndex" ], "additionalProperties": false } }, "nullable": false, "handle": "notifications" }, { "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" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "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": "sent" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "name": "Send issue alerts in order", "moduleId": "n_2d8416ee2aaa7e07", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [ { "action": "telegram.send_message" } ] } ] } } }, "edges": [ { "source": "n_8928088007ac9548", "target": "n_4840788d139a3aa8" }, { "source": "n_4840788d139a3aa8", "target": "n_e8b034325256823d" }, { "source": "n_e8b034325256823d", "target": "n_009f59f49f5b5e31" }, { "source": "n_009f59f49f5b5e31", "target": "n_19179ccd8bf8df01" }, { "source": "n_19179ccd8bf8df01", "target": "n_f0aa4960df7f4474", "sourceHandle": "issues" } ] } }, "modules": { "n_45918670b097b275": { "name": "Select last thirty minutes", "imports": [], "source": "export default function issueWindow() {\n return { since: new Date(Date.now() - 30 * 60 * 1000).toISOString() };\n}\n" }, "n_5b0cf0fd656aa541": { "name": "Select issues with few comments", "imports": [], "source": "export default function eligibleIssues({ issues }) {\n const isHttpLink = (value) => {\n const parts = typeof value === 'string' && /^https?:\\/\\/(\\[[0-9a-f:.]+\\]|[^\\s/\\\\?#@:%\\[\\]<>\"`]+)(?::(\\d{1,5}))?(?:[/?#][^\\s\\\\]*)?$/i.exec(value);\n return Boolean(parts && !/[\\u0000-\\u0020\\u007f]/.test(value) && (!parts[2] || Number(parts[2]) <= 65535));\n };\n const escape = (text) => String(text).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n const notifications = [];\n issues.forEach((issue, sourceIndex) => {\n if (issue.pull_request) return;\n if (!Number.isInteger(issue.comments) || issue.comments < 0) throw new Error('GitHub returned an invalid comment count');\n if (issue.comments >= 5) return;\n if (typeof issue.title !== 'string' || typeof issue.html_url !== 'string') throw new Error('GitHub returned an issue without its title or URL');\n if (!isHttpLink(issue.html_url)) throw new Error('GitHub returned an invalid issue URL');\n const text = 'New Issue: ' + escape(issue.title) + ' Link';\n if (text.length > 4096) throw new Error('The issue alert exceeds Telegram’s message limit');\n notifications.push({ text, sourceIndex });\n });\n return { notifications, count: notifications.length };\n}\n" }, "n_2d8416ee2aaa7e07": { "name": "Send issue alerts in order", "imports": [], "source": "export default async function sendIssueAlerts({ notifications, chatId }, context) {\n const sent = [];\n for (const { text } of notifications) sent.push(await context.actions.telegram.send_message({ chatId, text, parseMode: 'HTML' }));\n return { sent, count: sent.length };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }