Überblick über Messaging-Provider
Einführung
Abschnitt betitelt „Einführung“Greentic unterstützt mehrere Messaging-Plattformen über Messaging-Provider. Jeder Provider ist ein WASM-Komponentenpaket, das Folgendes übernimmt:
- Ingress - Nachrichten von der Plattform empfangen
- Egress - Nachrichten an die Plattform senden
- Operationen - Plattformspezifische Funktionen (Buttons, Karten, Threads)
Verfügbare Provider
Abschnitt betitelt „Verfügbare Provider“ Slack Mit Slack-Workspaces verbinden mit vollständiger App-Unterstützung
Microsoft Teams Mit Microsoft Teams-Kanälen und -Chats integrieren
Telegram Telegram-Bots mit Buttons und Inline-Keyboards erstellen
WhatsApp Mit der WhatsApp Business API verbinden
WebChat Chat-Widget in Ihre Website einbetten
Webex Mit Cisco Webex Teams integrieren
Email E-Mails als Nachrichten senden und empfangen
Architektur
Abschnitt betitelt „Architektur“External Platform (Slack/Teams/Telegram) │ ▼ Webhook┌─────────────────────────────────────────┐│ Ingress Component ││ (Parse platform-specific format) │└─────────────────────────────────────────┘ │ ▼ Normalized Message┌─────────────────────────────────────────┐│ NATS Bus ││ greentic.messaging.ingress.{tenant}... │└─────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────┐│ Flow Executor ││ (Process with your flows) │└─────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────┐│ NATS Bus ││ greentic.messaging.egress.{tenant}... │└─────────────────────────────────────────┘ │ ▼ Platform-specific format┌─────────────────────────────────────────┐│ Egress Component ││ (Format for platform API) │└─────────────────────────────────────────┘ │ ▼ API CallExternal PlatformNachrichtennormalisierung
Abschnitt betitelt „Nachrichtennormalisierung“Alle Provider normalisieren Nachrichten auf ein gemeinsames Format:
pub struct NormalizedMessage { pub id: String, pub channel_id: String, pub sender_id: String, pub sender_name: Option<String>, pub content: String, pub timestamp: u64, pub reply_to: Option<String>, pub attachments: Vec<Attachment>, pub metadata: Option<Value>,}Dadurch können Ihre Flows plattformübergreifend ohne Änderungen arbeiten.
Provider-Konfiguration
Abschnitt betitelt „Provider-Konfiguration“Im Bundle
Abschnitt betitelt „Im Bundle“providers: messaging-telegram: pack: "providers/messaging/messaging-telegram.gtpack" setup_flow: "setup_default" verify_flow: "verify_webhooks"
messaging-slack: pack: "providers/messaging/messaging-slack.gtpack" setup_flow: "setup_default"Setup-Antworten
Abschnitt betitelt „Setup-Antworten“{ "messaging-telegram": { "enabled": true, "public_base_url": "https://example.ngrok-free.app", "bot_token": "123456789:ABCdefGHI..." }, "messaging-slack": { "enabled": true, "public_base_url": "https://example.ngrok-free.app", "bot_token": "xoxb-xxx-xxx", "slack_app_id": "A07XXX" }}NATS-Subjects
Abschnitt betitelt „NATS-Subjects“Nachrichten fließen über NATS mit tenant-spezifischen Subjects:
| Subject | Richtung |
|---|---|
greentic.messaging.ingress.{env}.{tenant}.{team}.{channel} | Eingehend |
greentic.messaging.egress.{env}.{tenant}.{team}.{channel} | Ausgehend |
Gemeinsame Funktionen
Abschnitt betitelt „Gemeinsame Funktionen“Textnachrichten
Abschnitt betitelt „Textnachrichten“Alle Provider unterstützen grundlegende Textnachrichten:
- id: reply type: reply config: message: "Hello! How can I help?"Rich Content
Abschnitt betitelt „Rich Content“Die meisten Provider unterstützen Rich Content:
- id: send_card type: adaptive-card config: card: "cards/welcome.json"Buttons/Aktionen
Abschnitt betitelt „Buttons/Aktionen“Interaktive Elemente (providerabhängig):
- id: ask_choice type: reply config: message: "What would you like to do?" buttons: - label: "Get Help" action: "help" - label: "Contact Support" action: "support"Anhänge
Abschnitt betitelt „Anhänge“Unterstützung für Dateien und Medien:
- id: send_file type: reply config: message: "Here's your report" attachments: - type: file url: "https://example.com/report.pdf" name: "report.pdf"Multi-Channel-Flows
Abschnitt betitelt „Multi-Channel-Flows“Schreiben Sie Flows, die kanalübergreifend funktionieren:
name: universal_handlerversion: "1.0"
nodes: - id: greet type: reply config: # Works on any platform message: "Hello! I'm your assistant." next: ask_intent
- id: ask_intent type: reply config: message: "How can I help you today?" # Buttons render differently per platform buttons: - label: "Get Started" action: "start" - label: "Help" action: "help"
triggers: - type: message pattern: "hello|hi" target: greetProvider-Vergleich
Abschnitt betitelt „Provider-Vergleich“| Funktion | Slack | Teams | Telegram | WebChat | Webex | ||
|---|---|---|---|---|---|---|---|
| Text | Ja | Ja | Ja | Ja | Ja | Ja | Ja |
| Rich Cards | Ja | Ja | Teilweise | Ja | Ja | Ja | Nein |
| Buttons | Ja | Ja | Ja | Ja | Ja | Ja | Nein |
| Dateien | Ja | Ja | Ja | Ja | Ja | Ja | Ja |
| Threads | Ja | Ja | Ja | Nein | Nein | Ja | Ja |
| Reaktionen | Ja | Ja | Nein | Ja | Nein | Nein | Nein |
Nächste Schritte
Abschnitt betitelt „Nächste Schritte“Wählen Sie einen Provider für den Einstieg: