Notifications

Add a notification channel

notify_add_channel · Changes data · Markdown

Saves a place to send messages by name: Slack, Teams, Discord or Google Chat, a Telegram chat, ntfy, Pushover, or the business's own webhook.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Add our #workshop Slack channel so you can post updates there.

Your agent callsnotify_add_channel$0.001 a call

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "name": "workshop",
  "kind": "slack"
}
What comes back
{
  "link": "https://conecto.chat/api/bots/connect/lH-qMFn1YyAAPj4zzRTiPkJBqU8x81kKmmHRXHTFbKU",
  "expires_in_minutes": 60,
  "tell_the_owner": "Open this link within the hour, sign in to Conecto and type the Slack channel's incoming webhook address there. It goes to Conecto only; I never see it.",
  "from_a_terminal": "npx @conecto-chat/cli@latest run notify_add_channel -i '{\"name\": \"workshop\", \"kind\": \"slack\"}' -s webhook_url",
  "from_a_terminal_with_curl": "printf %s 'Webhook address: '; read -rs v1; echo; curl -sS -H \"Authorization: Bearer $CONECTO_KEY\" --data-urlencode webhook_url@<(printf %s \"$v1\") https://conecto.chat/api/bots/connect/lH-qMFn1YyAAPj4zzRTiPkJBqU8x81kKmmHRXHTFbKU; unset v1",
  "next": "When the owner types it on the link, account.credential_added (account_events) says so, with what notify_add_channel answered."
}

Use it when

The team wants messages or alerts where its people already look.

  • For a public post on the business's social accounts, use social_post.

What it does

Save a place to send messages, by name: Slack, Microsoft Teams, Discord or Google Chat (an incoming webhook URL), Telegram (bot_token and chat_id), ntfy (topic, optional server and access_token), Pushover (user_key and app_token), or your own webhook (url; each request is signed with a secret returned once). Called without the webhook URL, the bot's token or Pushover's keys, it answers with a link for the owner, who types them on a Conecto page, so they never pass through the chat (ntfy's token too, with ask_owner_for) (from_a_terminal does the same from a terminal); account.credential_added says when it is saved. A test message is sent first unless send_test is false; if it doesn't arrive, nothing is saved or charged. Tokens are stored encrypted and never shown back.

What comes back

Without the webhook URL, the bot's token or Pushover's keys: link, a page where the owner or an admin, signed in, types them, with expires_in_minutes, tell_the_owner, from_a_terminal (the CLI), from_a_terminal_with_curl and next. With them: channel, its name, kind, where it goes (never its token) and its events; tested: whether a test message went first; for a webhook of the business's own, webhook_secret (shown once) and how each request is signed. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
nameRequiredstringA short name for the channel, e.g. "sales-alerts" (lowercase letters, numbers, dashes). Matches ^[a-z0-9][a-z0-9-]{0,39}$.
kindRequiredstringOne of: slack,teams,discord,google_chat,telegram,ntfy,pushover,webhook.
webhook_urlstringUp to 1,000 characters.
bot_tokenstringUp to 100 characters.
chat_idstringUp to 40 characters.
topicstringUp to 64 characters.
serverstringUp to 300 characters.
access_tokenstringUp to 200 characters.
user_keystringUp to 40 characters.
app_tokenstringUp to 40 characters.
urlstringUp to 1,000 characters.
send_testbooleanDefault: true.
ask_owner_forarray of stringsntfy: the protected topic's access_token, typed by the owner on a Conecto page; the answer is a link. Up to 1 items. One of: access_token.

The call

Over MCP, call notify_add_channel on https://api.conecto.chat/mcp/notify. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/notify_add_channel \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"workshop","kind":"slack"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400A webhook is not the service's own https address, a token, chat, topic or key is not in its form, or a server or url is not a public https:// address.Send the values as the service gives them; the message names the one.
name_taken409A channel has that name already.Pick another name, or remove the old channel.
limit_reached409The business has 50 channels already.Remove one with notify_remove_channel.
delivery_failed502The test message did not arrive; nothing was saved or charged.Ask the owner to check the channel, or pass send_test: false. Leave the key out for a new link where they type it.
unavailable503Notifications are not available right now.Try again later; nothing was charged.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md