New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hubot-incoming-webhook

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-incoming-webhook

Accept incoming Webhooks to write messages to a room/channel

1.0.0
Source
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Hubot Incoming Webhook

A (very simple) hubot script for sending messages to a channel/room via HTTP POST requests to your bot.

Installation

Install script package in your bot's repository:

npm install --save hubot-incoming-webhook

Add to external_scripts.json:

[
  "incoming-webhook"
]

Set the WEBHOOK TOKEN environment variable to a secret string of your choice when running the bot. It will be used in the incoming webhook URL.

The URL is constructed as follows: http(s)://<host>:<port>/incoming/<your-secret-token>

Usage

Just POST a simple JSON body to the webhook URL.

KeyValue
room(string) The room/channel you want to post to. Include the hash character for IRC.
message(string/array) The message you want to post. Can be an array for multiple lines.

Example:

curl -X POST -H "Content-Type: application/json" \
     -d '{"room": "#kosmos", "message": "ohai"}' \
     http://127.0.0.1:8080/incoming/your-secret-token

Configuration

KeyDescription
WEBHOOK_TOKENA string for building your secret webhook URL

Keywords

hubot

FAQs

Package last updated on 20 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts