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, Microsoft Graph Email, HTTP, and WebSocket 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
oci://ghcr.io/greenticai/packs/messaging/messaging-http:latest
oci://ghcr.io/greenticai/packs/messaging/messaging-websocket: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.

Provider setup has two separate action types:

  • Provider-specific setup actions run during setup. For example, Slack’s setup action is Setup Slack App because it creates or updates the Slack app configuration.
  • Generic post-setup actions are declared by the pack with greentic.setup.actions.v1. Setup hosts can render these after provider setup completes, without hard-coding Slack, Teams, Telegram, or Webex behavior.

The current messaging packs expose these generic actions:

ProviderLabelURL source
SlackAdd to Slackslack_add_url returned by Slack setup
Microsoft TeamsAdd to Teamsadd_to_teams_url returned by Teams setup
TelegramAdd to Telegramhttps://t.me/{bot_username}
WebexAdd to WebExhttps://web.webex.com/teams/messages/new?email={bot_email}

Each action can be displayed as a button, copied as a URL, or rendered as an HTML snippet by setup tools. If a bundle includes more than one provider with setup actions, the final setup screen should show all available actions.

ProviderSetup model
SlackApp registration and OAuth install flow. The setup step is labeled Setup Slack App. Setup stores slack_app_id plus Slack configuration access/refresh tokens for manifest updates, then exposes a generic Add to Slack post-setup action.
Microsoft Teamsmessaging-teams uses a provider-owned setup wizard and backend contract. It guides Microsoft device-code sign-in, creates or reuses the Bot Framework app identity, registers the active Greentic endpoint, publishes the Teams app, installs it for the setup user, and exposes Add to Teams. messaging-teams-graph remains available for Graph channel sends/subscriptions.
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.
HTTPAnswer-owned provider generated from build-answer.json. It maps inbound HTTP requests into normalized messages and builds outbound HTTP request payloads.
WebSocketAnswer-owned provider generated from build-answer.json. It maps inbound WebSocket frames into normalized events and builds outbound WebSocket frames.

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 Bot Framework to the runtime ingress endpoint. Graph mode also uses HTTPS 443 Graph change and lifecycle notificationsHTTPS 443 to login.microsoftonline.com, graph.microsoft.com, Azure management endpoints used by setup, and Bot Framework service URLs
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
HTTPHTTPS 443 to the public runtime route when external systems call Greentic; local test harnesses can use the local runtime portConfigured outbound HTTP or HTTPS endpoints
WebSocketWSS 443 to the public runtime route when clients connect through TLS; local test harnesses can use WS on the local runtime portConfigured outbound WS or WSS 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
FeatureSlackTeamsTelegramWhatsAppWebChatWebexEmailHTTPWebSocket
TextYesYesYesYesYesYesYesPayload mapped to textFrame mapped to text
Native rich layoutBlock KitAdaptive CardsInline/reply keyboardsInteractive messages/templatesAdaptive CardsAdaptive CardsHTMLJSON payloadsJSON frames
Adaptive Card handlingTransformedNativeTransformedTransformedNativeNative subsetTransformed to HTMLCaller-definedCaller-defined
ButtonsYesYesYesYesYesYesLinks/formsCaller-definedCaller-defined
FilesYesYesYesYesYesYesAttachmentsURLs or payload metadataURLs or frame metadata
Threads/repliesThreadsConversations/repliesReply-to/topics onlyNoConversation historyThreads/spacesEmail headersRequest correlationConnection/session correlation
ReactionsPlatform-dependentPlatform-dependentNoNoNoNoNoNoNo

Choose a provider to get started:

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