๐ง Claude AI EnhancementsMarch 29, 2026โ
Tests passing
Claude Slack Workflow Bot
A CLI tool to automate the creation of Slack workflows integrated with Claude AI. It allows developers to set up triggers (like messages or events) that invoke Claude to process and respond intelligently, useful for team collaboration and prompt-based task automation.
What It Does
- Automates the creation of Slack workflows.
- Monitors specific Slack channels for triggers.
- Integrates with Claude AI for intelligent responses.
Installation
1. Clone this repository:
git clone <repository_url>
cd <repository_folder>2. Install the required dependencies:
pip install -r requirements.txtUsage
To run the tests, use pytest:
pytest test_claude_slack_workflow_bot.pySource Code
import json
import argparse
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
def create_slack_workflow(slack_token, trigger_channel, prompt):
"""
Creates a Slack workflow that triggers Claude AI to process messages in a given channel.
Args:
slack_token (str): Slack API token.
trigger_channel (str): Slack channel to monitor for triggers.
prompt (str): Prompt logic for Claude AI.
Returns:
dict: Workflow creation result.
"""
slack_client = WebClient(token=slack_token)
try:
# Fetch channel ID from channel name
response = slack_client.conversations_list()
channels = response.get("channels", [])
channel_id = None
for channel in channels:
if channel.get("name") == trigger_channel.lstrip("#"):
channel_id = channel.get("id")
break
if not channel_id:
raise ValueError(f"Channel '{trigger_channel}' not found.")
# Simulate workflow creation (Slack doesn't have a direct API for workflows)
workflow = {
"name": "Claude Workflow",
"trigger_channel": trigger_channel,
"prompt": prompt
}
# Log the workflow creation (mocking actual Slack workflow creation)
print("Workflow created:", json.dumps(workflow, indent=2))
return workflow
except SlackApiError as e:
raise RuntimeError(f"Slack API error: {e.response['error']}")
except Exception as e:
raise RuntimeError(f"Error creating workflow: {str(e)}")
def main():
parser = argparse.ArgumentParser(description="Claude Slack Workflow Bot")
parser.add_argument("--slack-token", required=True, help="Your Slack API token.")
parser.add_argument("--trigger", required=True, help="The Slack channel to monitor (e.g., #general).")
parser.add_argument("--prompt", required=True, help="The prompt logic for Claude AI.")
args = parser.parse_args()
try:
workflow = create_slack_workflow(args.slack_token, args.trigger, args.prompt)
print("Workflow successfully created:")
print(json.dumps(workflow, indent=2))
except Exception as e:
print(f"Error: {str(e)}")
if __name__ == "__main__":
main()Community
Downloads
ยทยทยท
Rate this tool
No ratings yet โ be the first!
Details
- Tool Name
- claude_slack_workflow_bot
- Category
- Claude AI Enhancements
- Generated
- March 29, 2026
- Tests
- Passing โ
- Fix Loops
- 2
Quick Install
Clone just this tool:
git clone --depth 1 --filter=blob:none --sparse \ https://github.com/ptulin/autoaiforge.git cd autoaiforge git sparse-checkout set generated_tools/2026-03-29/claude_slack_workflow_bot cd generated_tools/2026-03-29/claude_slack_workflow_bot pip install -r requirements.txt 2>/dev/null || true python claude_slack_workflow_bot.py