Messaging Providers 概要
Greentic は Messaging Providers を通じて複数の messaging platform をサポートします。各 provider は次を処理する WASM component pack です:
- Ingress - platform からメッセージを受信する
- Egress - platform へメッセージを送信する
- Operations - button、card、thread、file handling、webhook setup などの platform 固有機能
現在のカタログには、Slack、Microsoft Teams、Telegram、WhatsApp、WebChat、WebChat GUI、Webex、SMTP Email、Microsoft Graph Email、HTTP、WebSocket の messaging pack が含まれます。
利用可能な provider
Section titled “利用可能な provider” Slack Slack workspace に接続し、完全な app support を提供する
Microsoft Teams Microsoft Teams の channel と chat に統合する
Telegram button と inline keyboard を備えた Telegram bot を構築する
WhatsApp WhatsApp Business API に接続する
WebChat website に chat widget を埋め込む
Webex Cisco Webex Teams に統合する
Email SMTP email を送信し、Microsoft Graph mail を使用する
HTTP 受信 HTTP リクエストをマッピングし、送信 HTTP 呼び出しを構築する
WebSocket 受信 WebSocket frame をマッピングし、送信 frame を構築する
アーキテクチャ
Section titled “アーキテクチャ”External Platform (Slack/Teams/Telegram) │ ▼ Webhook┌─────────────────────────────────────────┐│ Ingress Component ││ (Parse platform-specific format) │└─────────────────────────────────────────┘ │ ▼ Normalized Message┌─────────────────────────────────────────┐│ Runtime Router ││ greentic.messaging.ingress.{tenant}... │└─────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────┐│ Flow Executor ││ (Process with your flows) │└─────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────┐│ Runtime Router ││ greentic.messaging.egress.{tenant}... │└─────────────────────────────────────────┘ │ ▼ Platform-specific format┌─────────────────────────────────────────┐│ Egress Component ││ (Format for platform API) │└─────────────────────────────────────────┘ │ ▼ API CallExternal Platformメッセージの正規化
Section titled “メッセージの正規化”すべての provider はメッセージを共通フォーマットに正規化します:
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>,}これにより、flow は修正なしでどの messaging platform 上でも動作できます。
provider 設定
Section titled “provider 設定”bundle 内
Section titled “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 Answers
Section titled “Setup Answers”{ "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" }}テキストメッセージ
Section titled “テキストメッセージ”すべての provider は基本的な text message をサポートします:
- id: reply type: reply config: message: "Hello! How can I help?"Rich Content
Section titled “Rich Content”ほとんどの provider は rich content をサポートします:
- id: send_card type: adaptive-card config: card: "cards/welcome.json"Buttons/Actions
Section titled “Buttons/Actions”interactive 要素(provider 依存):
- id: ask_choice type: reply config: message: "What would you like to do?" buttons: - label: "Get Help" action: "help" - label: "Contact Support" action: "support"添付ファイル
Section titled “添付ファイル”ファイルと media をサポートします:
- id: send_file type: reply config: message: "Here's your report" attachments: - type: file url: "https://example.com/report.pdf" name: "report.pdf"マルチチャネル flow
Section titled “マルチチャネル flow”複数チャネルで動く flow を書けます:
name: universal_handlerversion: "1.0"
nodes: - id: greet type: reply config: # Works on any platform message: "Hello! I'm your assistant." to: 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 比較
Section titled “Provider 比較”| Feature | Slack | Teams | Telegram | WebChat | Webex | ||
|---|---|---|---|---|---|---|---|
| Text | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Rich Cards | Yes | Yes | Partial | Yes | Yes | Yes | No |
| Buttons | Yes | Yes | Yes | Yes | Yes | Yes | No |
| Files | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Threads | Yes | Yes | Yes | No | No | Yes | Yes |
| Reactions | Yes | Yes | No | Yes | No | No | No |
次のステップ
Section titled “次のステップ”使い始める provider を選んでください: