Skip to content

Messaging Extensions Overview

Greentic supports multiple messaging platforms through messaging extension packs. Each extension is a WASM pack that handles:

  • Ingress - Receiving messages from the platform
  • Egress - Sending messages to the platform
  • Operations - Platform-specific features such as buttons, cards, threads, file handling, and webhook setup

The current catalog includes Slack, Microsoft Teams, Telegram, WhatsApp, WebChat, WebChat GUI, Webex, SMTP Email, and Microsoft Graph Email messaging packs.

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 Call
External Platform

All providers normalize messages to a common 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>,
}

This allows your flows to work across any messaging platform without modification.

Messaging extensions are normally selected with gtc wizard, which writes the bundle metadata and pack references for you. The built-in catalog uses OCI references such as:

oci://ghcr.io/greenticai/packs/messaging/messaging-slack:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-teams:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-telegram:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-whatsapp:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-webchat:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-webchat-gui:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-webex:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-email:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-microsoft-email:latest

Run gtc setup ./my-bundle interactively, or provide an answers file generated with gtc setup --dry-run --emit-answers answers.json ./my-bundle.

answers.json
{
"greentic_setup_version": "1.0.0",
"tenant": "demo",
"team": null,
"env": "dev",
"platform_setup": {
"static_routes": {
"public_web_enabled": true,
"public_base_url": "https://example.trycloudflare.com",
"public_surface_policy": "enabled",
"default_route_prefix_policy": "pack_declared",
"tenant_path_policy": "pack_declared"
},
"deployment_targets": [],
"tunnel": {
"mode": "cloudflared"
}
},
"setup_answers": {
"messaging-telegram": {
"public_base_url": "https://example.trycloudflare.com",
"api_base_url": "https://api.telegram.org",
"telegram_bot_token": "123456789:ABCdefGHI..."
},
"messaging-slack": {
"slack_configuration_access_token": "xoxe.xoxp-...",
"slack_configuration_refresh_token": "xoxe-1-..."
},
"messaging-webex": {
"webex_bot_token": "your-webex-bot-access-token"
}
}
}

Provider setup is pack-owned. Hosts should use the installed pack’s setup schema and metadata instead of inferring provider-specific fields. New answers files keep provider fields under setup_answers; the top-level platform_setup block carries static routes, deployment targets, and tunnel preferences. Several providers generate internal secrets during setup, including the Webex webhook secret and WebChat GUI JWT signing key.

ProviderSetup model
SlackApp registration and OAuth install flow. Setup stores slack_app_id plus Slack configuration access/refresh tokens for manifest updates.
Microsoft TeamsGraph-first device-code setup. It discovers teams/channels, stores IDs and labels, and can create a missing desired channel with Channel.Create. Bot Framework ingest remains supported as a separate config shape.
TelegramBot token, Telegram API base URL, optional default chat ID, and public webhook URL.
WhatsAppMeta Cloud API phone number, business account, Graph API base URL/version, access token, verify token, and public webhook URL.
WebChat GUIHosted browser UI. Defaults to websocket; setup generates the JWT signing key and supports optional OAuth/branding fields.
WebChatDirect Line-compatible provider. Requires public base URL, mode, and JWT signing key when used without the GUI pack.
WebexBot access token only. Setup generates the webhook secret and reconciles direct-message, mention, and card-action webhooks.
Emailmessaging-email is SMTP. messaging-microsoft-email is Microsoft Graph mail with delegated OAuth credentials.

Messaging packs do not require provider-specific local listening ports. They use the Greentic runtime’s public HTTP(S) listener for browser traffic and platform webhooks. In production, expose that listener through HTTPS on port 443; in local development, gtc setup can use a tunnel such as Cloudflare Tunnel to forward a public HTTPS URL to the local runtime port.

ProviderIncoming to GreenticOutgoing from Greentic
SlackHTTPS 443 from Slack Events API, interactive components, slash commands, and OAuth redirects to the public ingress URLHTTPS 443 to slack.com and api.slack.com for OAuth, Web API calls, app registration, and manifest updates
Microsoft TeamsHTTPS 443 from Microsoft Graph change notifications and lifecycle notifications. Bot Framework mode also receives HTTPS 443 Bot Framework callbacksHTTPS 443 to login.microsoftonline.com, graph.microsoft.com, and Bot Framework service URLs when Bot Framework mode is used
TelegramHTTPS 443 from Telegram webhook delivery to the public ingress URLHTTPS 443 to api.telegram.org or the configured Telegram API base URL
WhatsAppHTTPS 443 from Meta webhook verification and message callbacksHTTPS 443 to graph.facebook.com or the configured Meta Graph API base URL
WebexHTTPS 443 from Webex messages.created and attachmentActions.created webhooksHTTPS 443 to webexapis.com
WebChat / WebChat GUIBrowser HTTPS 443 and WSS 443 to the public WebChat route. Local development may use an unencrypted localhost port behind a tunnelUsually no third-party messaging egress. OAuth/OIDC login uses HTTPS 443 to the configured identity provider
EmailSMTP has no Greentic inbound port. Microsoft Graph mail subscriptions, when enabled by the installed pack, use HTTPS 443 callbacksSMTP over TCP 587 with STARTTLS or TCP 465 with implicit TLS. Microsoft Graph mail uses HTTPS 443 to Microsoft identity and Graph endpoints

All providers support basic text messages:

- id: reply
type: reply
config:
message: "Hello! How can I help?"

Most providers support rich content:

- id: send_card
type: adaptive-card
config:
card: "cards/welcome.json"

Interactive elements (provider-dependent):

- id: ask_choice
type: reply
config:
message: "What would you like to do?"
buttons:
- label: "Get Help"
action: "help"
- label: "Contact Support"
action: "support"

File and media support:

- id: send_file
type: reply
config:
message: "Here's your report"
attachments:
- type: file
url: "https://example.com/report.pdf"
name: "report.pdf"

Write flows that work across channels:

flows/on_message.ygtc
name: universal_handler
version: "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: greet
FeatureSlackTeamsTelegramWhatsAppWebChatWebexEmail
TextYesYesYesYesYesYesYes
Native rich layoutBlock KitAdaptive CardsInline/reply keyboardsInteractive messages/templatesAdaptive CardsAdaptive CardsHTML
Adaptive Card handlingTransformedNativeTransformedTransformedNativeNative subsetTransformed to HTML
ButtonsYesYesYesYesYesYesLinks/forms
FilesYesYesYesYesYesYesAttachments
Threads/repliesThreadsConversations/repliesReply-to/topics onlyNoConversation historyThreads/spacesEmail headers
ReactionsPlatform-dependentPlatform-dependentNoNoNoNoNo

Choose a provider to get started:

  • Telegram - Easiest setup, great for testing
  • Slack - Full-featured workspace integration
  • WebChat - Embed in your website