OpenClawSkills
GitHub

Slack Notify

Community

Send a simple webhook notification to a Slack channel.

Installation

Save as `slack.js`. Requires SLACK_WEBHOOK_URL.

Source Code

JavaScript
Tutorial.terminal

// slack.js

module.exports = async function(context) {
    const text = context.args.join(' ');
    const url = process.env.SLACK_WEBHOOK_URL;
    
    if (!url) return { error: "No webhook URL configured" };
    
    await fetch(url, {
        method: 'POST',
        body: JSON.stringify({ text })
    });
    
    return { status: "sent" };
};

Live Preview

● Live Demo
Agent Session
Starting session...

How to use

  • Ensure you have the necessary dependencies installed (if any).
  • Place the file in your OpenClaw skills folder (e.g., ~/.openclaw/skills/).
  • Restart your agent or reload configuration.
  • Invoke it using the filename (without extension) as the tool name, or through natural language if the description is clear.