Custom Commands - DailyBot Developers

Build custom ChatOps commands for DailyBot: text commands, in-chat forms, and HTTP commands with dynamic responses.

Custom Commands

Custom commands let you extend DailyBot with your own ChatOps interactions. Users trigger commands by typing a keyword in chat, and DailyBot responds with text, forms, or dynamic content from your endpoints.

Command Types

DailyBot supports three types of custom commands:

  • Text Commands — Return a predefined text response
  • In-Chat Form Commands — Trigger native forms that collect data
  • HTTP Commands — Send requests to your endpoints for dynamic responses

Text Commands

Text commands return a simple, predefined response. They are useful for frequently accessed information like company values, on-call schedules, or quick reference links.

In-Chat Form Commands

In-chat form commands trigger native DailyBot forms that collect structured data. Responses are stored in DailyBot tables. Users can search through collected responses by typing the command name followed by "search" and a query term.

HTTP Commands

HTTP commands are the most powerful type. When a user triggers the command, DailyBot sends a POST request to your endpoint with context about the user and command, and your endpoint returns the response to display in chat.

HTTPS Required

Your endpoint must use HTTPS. DailyBot will not send requests to HTTP endpoints.

Authentication Header

DailyBot sends an X-DailyBot-Signature header with every request. This contains the command signature so your endpoint can verify the request came from DailyBot.

Request Payload

The POST body includes the following context fields:

Payload Fields

Name Type Required Description
intent string Required The command intent name as configured in DailyBot.
event_timestamp string Required ISO 8601 timestamp of when the command was triggered.
organization_uuid string Required UUID of the organization.
user_uuid string Required UUID of the user who triggered the command.
user_full_name string Required Full name of the triggering user.
user_role string Required Role of the user (admin, member, etc.).
is_channel_message boolean Required Whether the command was triggered in a channel (true) or direct message (false).
platform string Required Chat platform (slack, msteams, google_chat, etc.).
params.query string Optional Additional text passed after the command name.
Example request payload
{
  "intent": "deploy",
  "event_timestamp": "2026-02-14T12:00:00Z",
  "organization_uuid": "org-1234-abcd",
  "user_uuid": "usr-5678-efgh",
  "user_full_name": "Jane Smith",
  "user_role": "admin",
  "is_channel_message": true,
  "platform": "slack",
  "params": {
    "query": "production v2.1.0"
  }
}

Tip

Use params.query to build flexible commands. Users can append parameters after the command name (e.g., /deploy production v2.1.0), and the extra text becomes the query string.

Response Formats

Plain Text

The simplest response: return a text body as a valid JSON string. DailyBot will display it directly in chat.

Plain text response
"Deployment started for production v2.1.0 ✅"

JSON Field

Return a JSON object and specify which field to render as the response in your command settings.

JSON response
{
  "status": "success",
  "message": "Deployment started for production v2.1.0",
  "build_id": "build-789"
}

Interactive Buttons

Return a JSON object with a message, optional image, and an array of buttons for interactive workflows.

Button Fields

Name Type Required Description
label string Required Visible text on the button.
label_after_click string Required Text shown after the button is clicked.
value string Required Must include the command intent name. Additional text becomes params.query.
button_type string Required Must be "Command".
Interactive buttons response
{
  "message": "Choose an environment to deploy:",
  "buttons": [
    {
      "label": "Production",
      "label_after_click": "Deploying to production...",
      "value": "deploy production",
      "button_type": "Command"
    },
    {
      "label": "Staging",
      "label_after_click": "Deploying to staging...",
      "value": "deploy staging",
      "button_type": "Command"
    }
  ]
}

Response Timeout

10 Second Timeout

Your endpoint must respond within 10 seconds. If your operation takes longer, contact the DailyBot support team to discuss asynchronous response options.

Code Example

DailyBot provides a CodeSandbox example demonstrating a Node.js implementation of an HTTP command endpoint.

Best Practices

  • Always validate the X-DailyBot-Signature header to verify requests
  • Use params.query for flexible, multi-purpose commands
  • Keep responses under 10 seconds — offload heavy processing to background jobs
  • Use interactive buttons to build multi-step workflows
  • Return helpful error messages when inputs are invalid
  • Log requests for debugging — include the user_uuid for tracing