@catalogicus-international/n8n-nodes-telegram-advance 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.d.ts +10 -0
- package/dist/nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.js +50 -0
- package/dist/nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.js.map +1 -0
- package/dist/nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.json +23 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -144,6 +144,14 @@ The trigger shares the same per-bot update stream as waiting questions. This
|
|
|
144
144
|
lets one bot receive ordinary updates while also handling Telegram Advance
|
|
145
145
|
approval, choice, and reply waits.
|
|
146
146
|
|
|
147
|
+
### Telegram Advance AI Webhook
|
|
148
|
+
|
|
149
|
+
Use this node when an n8n AI Agent should call Telegram as a tool while answers
|
|
150
|
+
arrive through Telegram webhooks. It exposes the same send and send-and-wait
|
|
151
|
+
surface as `Telegram Advance Webhook`, declares `usableAsTool`, and relies on an
|
|
152
|
+
active `Telegram Advance Webhook Trigger` on the same bot to deliver button
|
|
153
|
+
presses and free-text replies to the waiting execution.
|
|
154
|
+
|
|
147
155
|
## Setup
|
|
148
156
|
|
|
149
157
|
1. Create a bot with [BotFather](https://t.me/BotFather) and copy its token.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class TelegramAdvanceAiWebhook implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
credentialTest: {
|
|
6
|
+
telegramAdvanceApiCredentialTest: import("n8n-workflow").ICredentialTestFunction;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAdvanceAiWebhook = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const actionShared_1 = require("../actionShared");
|
|
6
|
+
const credentialTest_1 = require("../credentialTest");
|
|
7
|
+
class TelegramAdvanceAiWebhook {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Telegram Advance AI Webhook',
|
|
11
|
+
name: 'telegramAdvanceAiWebhook',
|
|
12
|
+
icon: 'file:../../icons/telegram.svg',
|
|
13
|
+
group: ['output'],
|
|
14
|
+
version: 1,
|
|
15
|
+
subtitle: '={{ $parameter["operation"] === "sendAndWait" ? $parameter["responseType"] : "send message" }}',
|
|
16
|
+
description: 'AI Agent-ready Telegram webhook node for sending messages or waiting for in-chat responses',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Telegram Advance AI Webhook',
|
|
19
|
+
},
|
|
20
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
usableAsTool: true,
|
|
23
|
+
credentials: [
|
|
24
|
+
{
|
|
25
|
+
name: 'telegramAdvanceApi',
|
|
26
|
+
required: true,
|
|
27
|
+
testedBy: 'telegramAdvanceApiCredentialTest',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
properties: (0, actionShared_1.buildActionProperties)({
|
|
31
|
+
displayName: 'AI Agent Webhook Wait',
|
|
32
|
+
name: 'waitNotice',
|
|
33
|
+
type: 'notice',
|
|
34
|
+
default: '',
|
|
35
|
+
description: 'This AI Agent-ready node sends the question and waits for an in-chat answer delivered through an active Telegram Advance Webhook Trigger on the same bot. It keeps Telegram webhooks enabled, so do not run long polling for this bot at the same time. In n8n queue mode, configure Redis in the credentials so webhook answers can reach the waiting execution across workers.',
|
|
36
|
+
displayOptions: { show: { operation: ['sendAndWait'] } },
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
this.methods = {
|
|
40
|
+
credentialTest: {
|
|
41
|
+
telegramAdvanceApiCredentialTest: credentialTest_1.testTelegramAdvanceCredential,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async execute() {
|
|
46
|
+
return (0, actionShared_1.runAction)(this, 'webhook');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.TelegramAdvanceAiWebhook = TelegramAdvanceAiWebhook;
|
|
50
|
+
//# sourceMappingURL=TelegramAdvanceAiWebhook.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelegramAdvanceAiWebhook.node.js","sourceRoot":"","sources":["../../../nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.ts"],"names":[],"mappings":";;;AAMA,+CAAmD;AACnD,kDAAmE;AACnE,sDAAkE;AAElE,MAAa,wBAAwB;IAArC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,0BAA0B;YAChC,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,gGAAgG;YAC1G,WAAW,EACV,4FAA4F;YAC7F,QAAQ,EAAE;gBACT,IAAI,EAAE,6BAA6B;aACnC;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,oBAAoB;oBAC1B,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,kCAAkC;iBAC5C;aACD;YACD,UAAU,EAAE,IAAA,oCAAqB,EAAC;gBACjC,WAAW,EAAE,uBAAuB;gBACpC,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,kXAAkX;gBACnX,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE;aACxD,CAAC;SACF,CAAC;QAEF,YAAO,GAAG;YACT,cAAc,EAAE;gBACf,gCAAgC,EAAE,8CAA6B;aAC/D;SACD,CAAC;IAOH,CAAC;IAHA,KAAK,CAAC,OAAO;QACZ,OAAO,IAAA,wBAAS,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnC,CAAC;CACD;AA7CD,4DA6CC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "@catalogicus-international/n8n-nodes-telegram-advance.telegramAdvanceAiWebhook",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Communication", "HITL"],
|
|
6
|
+
"subcategories": {
|
|
7
|
+
"AI": ["Tools"],
|
|
8
|
+
"HITL": ["Human in the Loop"]
|
|
9
|
+
},
|
|
10
|
+
"alias": ["telegram", "approval", "choice", "wait", "human", "product", "webhook", "ai", "agent", "tool"],
|
|
11
|
+
"resources": {
|
|
12
|
+
"credentialDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://core.telegram.org/bots/features#creating-a-new-bot"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"primaryDocumentation": [
|
|
18
|
+
{
|
|
19
|
+
"url": "https://github.com/catalogicus-international/n8n-nodes-telegram-advance#readme"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catalogicus-international/n8n-nodes-telegram-advance",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Native Telegram approval, choice, and reply workflows for n8n without external response pages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"packageManager": "pnpm@9.15.0",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"dist/nodes/TelegramAdvance/TelegramAdvance.node.js",
|
|
48
48
|
"dist/nodes/TelegramAdvanceTrigger/TelegramAdvanceTrigger.node.js",
|
|
49
49
|
"dist/nodes/TelegramAdvanceWebhook/TelegramAdvanceWebhook.node.js",
|
|
50
|
+
"dist/nodes/TelegramAdvanceAiWebhook/TelegramAdvanceAiWebhook.node.js",
|
|
50
51
|
"dist/nodes/TelegramAdvanceWebhookTrigger/TelegramAdvanceWebhookTrigger.node.js"
|
|
51
52
|
]
|
|
52
53
|
},
|