Slack Webhook Setup
Create a Slack Incoming Webhook URL so Octocom can send notifications to your Slack channels.
Slack Incoming Webhooks let Octocom post messages to a Slack channel of your choice. Once you have a webhook URL, you can use it with the send_slack_notification helper in any Python action, event handler, or condition provider.
Step 1 — Create a Slack app
- Go to api.slack.com/apps and click Create New App
- Choose From scratch
- Give it a name (e.g., "Octocom Notifications") and select the workspace you want to post to
- Click Create App
Step 2 — Enable Incoming Webhooks
- In the app settings sidebar, click Incoming Webhooks
- Toggle Activate Incoming Webhooks to On
Step 3 — Create a webhook for a channel
- Click Add New Webhook to Workspace
- Select the channel where you want notifications to appear (e.g.,
#customer-support) - Click Allow
- Slack generates a webhook URL that looks like:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX- Copy this URL — you'll use it in your Octocom Python actions
Step 4 — Use the webhook in Octocom
Pass the webhook URL to send_slack_notification in any Python action:
def execute_action(context):
send_slack_notification(
"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXX",
"New refund request from conversation " + context["conversation"]["publicId"],
)
return {"success": True}Adding more channels
Repeat Step 3 for each channel you want to post to. Each channel gets its own webhook URL. You can use different URLs in different actions to route notifications to the right team.
Message formatting
Slack webhooks support mrkdwn formatting:
| Syntax | Result |
|---|---|
*bold* | bold |
_italic_ | italic |
~strikethrough~ | |
`code` | code |
\n | Line break |
Links
To include a clickable link with custom text, use angle brackets with a pipe separator:
<https://example.com|Click here>Plain URLs are automatically turned into clickable links, but you can also wrap them in angle brackets for reliability:
<https://example.com>Security
- Treat the webhook URL as a secret. Anyone with the URL can post to your channel.
- Do not share webhook URLs in public repositories or client-facing code.
- If a webhook URL is compromised, revoke it in the Slack app settings and create a new one.