Integrations
The Signal Bot integrates with multiple external services to provide enhanced functionality. This page provides an overview of all integrations and their configuration.
Integration Status Overview
Section titled “Integration Status Overview”| Service | Purpose | Commands | Status Check |
|---|---|---|---|
| PeerTube | Video hosting | !save | ./deploy.sh test-api |
| Discourse | Forum posting | !fpost, !flatest, !fsearch | Check logs |
| Outline | Wiki docs | !ol, !outline | Check logs |
| Authentik | SSO accounts | !createuser, !accountinvite | Check logs |
| Local AI | Self-hosted AI | !lai, !uai | ./deploy.sh test-api |
| OpenAI | AI assistant | !ai, !summarize | Check logs |
| MinIO | File storage | !archive, !files | ./deploy.sh test-minio |
| Shlink | URL shortening | (auto) | ./deploy.sh test-shlink |
| GitLab Wiki | Wiki content push | !wikiadd | Check logs |
| Gitea | Git repos | (auto 3D file archiving) | Check logs |
| Wikipedia | General knowledge | !ask (via unified search) | Public API |
| Google Knowledge Graph | Entity facts | !ask (via unified search) | Optional API key |
PeerTube
Section titled “PeerTube”Purpose: Upload and host videos from Signal
Commands:
!save- Upload video with AI-generated metadata
Configuration
Section titled “Configuration”PEERTUBE_URL=http://peertube:9000 # Internal Docker URLPEERTUBE_PUBLIC_URL=https://videos.irregularchat.comPEERTUBE_ACCESS_TOKEN=<long-lived-token>PEERTUBE_CHANNEL_ID=1Getting an Access Token
Section titled “Getting an Access Token”- Log into PeerTube as an admin
- Go to Settings > Application tokens
- Create a token with upload permissions
- Set expiry to far future (e.g., 2030)
How It Works
Section titled “How It Works”- User replies to video with
!save - Bot downloads video from Signal
- AI analyzes frames + audio transcript for metadata
- Video uploaded to PeerTube with generated title/description
- Bot returns watch link (SSO login required)
Troubleshooting
Section titled “Troubleshooting”# Test connectivity./deploy.sh test-api
# Check PeerTube is reachabledocker exec signal-bot-selfhosted-signal-bot-1 curl -s http://peertube:9000/api/v1/configDiscourse
Section titled “Discourse”Purpose: Post content to community forum
Commands:
!fpost- Create forum post!flatest- Show latest posts!fsearch <query>- Search forum!categories- List categories
Auto-features:
- News articles auto-posted with AI summaries
- Breakout room summaries posted to forum
Configuration
Section titled “Configuration”DISCOURSE_URL=https://forum.irregularchat.comDISCOURSE_API_KEY=<api-key>DISCOURSE_USERNAME=bot.usernameDISCOURSE_QA_CATEGORY=5 # Category ID for Q&A/news postsGetting API Key
Section titled “Getting API Key”- Go to Admin > API > API Keys
- Create a key for the bot user
- Set appropriate permissions (create topics, post)
Getting Category ID
Section titled “Getting Category ID”# Via APIcurl -H "Api-Key: <key>" -H "Api-Username: <user>" \ "https://forum.irregularchat.com/categories.json" | jq '.category_list.categories[] | {id, name}'
# Or check URL: /c/category-name/5 (5 is the ID)Outline
Section titled “Outline”Purpose: Create and search team documentation
Commands:
!ol <query>- Search docs!ol ask <question>- AI Q&A from docs!ol note <text>- Quick note!ol ai <content>- Create doc with AI structure!ol -n 5- Capture last 5 messages to doc
Configuration
Section titled “Configuration”OUTLINE_URL=https://outline.irregularchat.comOUTLINE_API_KEY=<api-key>OUTLINE_DEFAULT_COLLECTION=<collection-uuid>Getting API Key
Section titled “Getting API Key”- Log into Outline
- Go to Settings > API
- Create a new API key
Breakout Room Integration
Section titled “Breakout Room Integration”When a breakout room ends:
- AI generates summary with decisions/action items
- Summary posted to Outline
- Link shared in original channel
Authentik SSO
Section titled “Authentik SSO”Purpose: Create SSO accounts for new members
Commands:
!createuser @user email- Create account!accountinvite [hours]- Create invite link
Configuration
Section titled “Configuration”AUTHENTIK_BASE_URL=https://sso.irregularchat.comAUTHENTIK_API_TOKEN=<api-token>AUTHENTIK_INVITE_FLOW_ID=<flow-uuid>AUTHENTIK_INVITE_FLOW_SLUG=invite-enrollment-flowGetting API Token
Section titled “Getting API Token”- Go to Admin > System > Tokens
- Create a new token with appropriate permissions
- Token needs: user creation, flow access
Getting Flow ID
Section titled “Getting Flow ID”curl -s -H "Authorization: Bearer <token>" \ "https://sso.irregularchat.com/api/v3/flows/instances/" \ | jq '.results[] | "\(.pk) - \(.slug) - \(.name)"'Look for invite-enrollment-flow or similar enrollment flow.
Local AI (Open WebUI)
Section titled “Local AI (Open WebUI)”Purpose: Self-hosted AI for unrestricted queries
Commands:
!lai <question>- Community AI model!uai <question>- Uncensored model
Configuration
Section titled “Configuration”LOCAL_AI_URL=https://ai.irregularchat.comLOCAL_AI_API_KEY=<api-key>LOCAL_AI_MODEL=irregularbotModel Selection
Section titled “Model Selection”| Command | Model | Behavior |
|---|---|---|
!lai | irregularbot | Moderate filtering |
!uai | uncensored | No refusals |
Test Connectivity
Section titled “Test Connectivity”./deploy.sh test-apiOpenAI
Section titled “OpenAI”Purpose: AI assistant, summarization, embeddings
Commands:
!ask <question>- Unified agentic search (router, gap detection, synthesis)!ai <question>- GPT-4o-mini questions!summarize <url>- Summarize content!tldr <url>- Quick summary!wikiask <question>- Wiki Q&A (uses embeddings)
Auto-features:
- Unified search routing, gap detection, and answer synthesis
- News article summarization
- Video metadata generation
- Breakout room summaries
Configuration
Section titled “Configuration”OPENAI_API_KEY=sk-...Rate Limiting
Section titled “Rate Limiting”- 20 requests per hour per user
- Group chats only (security)
MinIO S3
Section titled “MinIO S3”Purpose: File storage and archiving
Commands:
!archive- Archive a file!files <query>- Search archive!get <file>- Get file link
Auto-features:
- Auto-scan and archive attachments
- Meme storage
Configuration
Section titled “Configuration”MINIO_ENDPOINT=http://minio-irregularchat:9000 # InternalMINIO_ACCESS_KEY=<access-key>MINIO_SECRET_KEY=<secret-key>MINIO_BUCKET=irregularchatMINIO_REGION=us-east-1MINIO_PUBLIC_URL=https://s3.irregular.chat # Public for presigned URLsDual Client Architecture
Section titled “Dual Client Architecture”MinIO requires TWO S3 clients:
- Internal Client (
MINIO_ENDPOINT): For API operations - Presign Client (
MINIO_PUBLIC_URL): For generating presigned URLs
This ensures signature verification works correctly.
Test Connection
Section titled “Test Connection”./deploy.sh test-minioShlink URL Shortener
Section titled “Shlink URL Shortener”Purpose: Shorten long presigned URLs
Auto-feature: Automatically shortens MinIO presigned URLs for cleaner display
Configuration
Section titled “Configuration”SHLINK_API_URL=http://shlink-api:8080SHLINK_API_KEY=<api-key>SHLINK_PUBLIC_URL=https://irregular.chatHow It Works
Section titled “How It Works”- MinIO generates presigned URL (long, contains signature)
- Shlink creates short URL pointing to presigned URL
- Short URL expires when presigned URL expires
Test Connection
Section titled “Test Connection”./deploy.sh test-shlinkPurpose: Archive 3D printing files to git
Auto-feature: When 3D file links (Thingiverse, Cults3D, Printables) are shared, files are archived to Gitea
Configuration
Section titled “Configuration”GITEA_API_URL=https://git.irregularchat.com/api/v1GITEA_TOKEN=<api-token>GITEA_DEFAULT_OWNER=irregularsGITEA_DEFAULT_REPO=3d-filesSupported Sites
Section titled “Supported Sites”- Thingiverse
- Cults3D
- Printables
- MyMiniFactory
GitLab Wiki (IrregularPedia)
Section titled “GitLab Wiki (IrregularPedia)”Purpose: Push AI-extracted content from Signal chats to the community wiki
Commands:
!wikiadd- Reply to a message to extract and add wiki-worthy content!wikiadd -n <count>- Analyze last N messages for facts and resources!wa -n <count>- Alias for!wikiadd -n
Configuration
Section titled “Configuration”GITLAB_WIKI_URL=http://gitlab:8929/irregulars/IrregularChatWiki.git # Internal Docker URLGITLAB_WIKI_TOKEN=<personal-access-token> # write_repository scopeWIKI_WORKDIR_PATH=/app/wiki-workdir # Git clone directoryWIKI_GIT_USER=IrregularBot # Commit author nameWIKI_GIT_EMAIL=bot@irregularchat.com # Commit author emailSetup Requirements
Section titled “Setup Requirements”- GitLab bot user with Maintainer access on the wiki project (required to push to protected
mainbranch) - Personal access token with
write_repositoryscope - Docker volume for
wiki-workdir(persists git clone across container restarts) - Docker network — bot and GitLab must share a network (e.g.,
postgres-network) so the bot can reachgitlab:8929
How It Works
Section titled “How It Works”- User runs
!wikiadd(reply or-ncount) - Bot extracts messages from Signal chat history
- OpenAI analyzes messages for factual, educational content
- Bot searches existing wiki pages by title AND content snippets
- AI decides: append to existing page or create a new page
- Bot clones/pulls the wiki repo into
wiki-workdir - Changes are committed and pushed to GitLab
- Astro Starlight rebuilds the site (irregularpedia.org)
Security
Section titled “Security”- Git credentials are embedded in the remote URL at runtime, never logged
- All error messages are sanitized to prevent token leakage
- File paths are validated against path-traversal attacks
- YAML frontmatter and Markdown content are sanitized against injection
- A mutex lock prevents concurrent wiki operations
Troubleshooting
Section titled “Troubleshooting”# Check wiki-workdir permissions (must be writable by node user, UID 1000)docker exec signal-bot-selfhosted-signal-bot-1 ls -la /app/wiki-workdir
# Test GitLab connectivity from inside containerdocker exec signal-bot-selfhosted-signal-bot-1 git ls-remote http://gitlab:8929/irregulars/IrregularChatWiki.git
# Check bot user access level (must be 40 = Maintainer)# Via GitLab rails console on the GitLab containerKey Files
Section titled “Key Files”src/src/utils/wiki-content-manager.ts— Core module (clone, analyze, commit, push)src/src/bot/command-handler.ts—handleWikiAdd()method
Wikipedia
Section titled “Wikipedia”Purpose: General knowledge search for the !ask unified search command
Used by: !ask (unified search) — selected by the AI router for general knowledge, concepts, people, organizations, and history questions.
How It Works
Section titled “How It Works”- AI router determines the question needs general knowledge
- Wikipedia MediaWiki Action API is queried with the question
- Top articles are fetched with summaries (extracts)
- Results are included in the unified search context for synthesis
Configuration
Section titled “Configuration”No API key or authentication required. Uses the public MediaWiki Action API.
Rate limit: 200 requests/second (well above bot usage)
Key File
Section titled “Key File”src/src/utils/wikipedia-client.ts
Google Knowledge Graph
Section titled “Google Knowledge Graph”Purpose: Quick structured facts about well-known entities (people, organizations, places, concepts)
Used by: !ask (unified search) — selected by the AI router for entity disambiguation and quick facts.
How It Works
Section titled “How It Works”- AI router determines the question involves a well-known entity
- Google Knowledge Graph Search API returns structured data
- Entity descriptions and detailed summaries are extracted
- Results are included in the unified search context
Configuration
Section titled “Configuration”GOOGLE_KG_API_KEY=<your-api-key> # Optional — if not set, Knowledge Graph is silently skippedGetting an API Key
Section titled “Getting an API Key”- Go to Google Cloud Console
- Enable the “Knowledge Graph Search API”
- Create an API key (no OAuth required)
- Free tier: 100,000 queries/day
Key File
Section titled “Key File”src/src/utils/knowledge-graph-client.ts
External APIs (Optional)
Section titled “External APIs (Optional)”Thingiverse
Section titled “Thingiverse”For 3D file metadata extraction:
THINGIVERSE_ACCESS_TOKEN=<token>Cults3D
Section titled “Cults3D”CULTS3D_API_KEY=<api-key>Research Tools
Section titled “Research Tools”For !research command:
RESEARCHTOOLS_API_URL=<url>Integration Testing
Section titled “Integration Testing”Test All Integrations
Section titled “Test All Integrations”# PeerTube + Local AI./deploy.sh test-api
# MinIO S3./deploy.sh test-minio
# Shlink./deploy.sh test-shlink
# Check logs for other integrations./deploy.sh logs -t 100 | grep -E "(Authentik|Outline|Discourse)"Verify in Container
Section titled “Verify in Container”./deploy.sh shell
# Inside container:env | grep -E "(PEERTUBE|DISCOURSE|OUTLINE|AUTHENTIK)"Related Documentation
Section titled “Related Documentation”- Configuration Reference - All environment variables
- Automated Features - Background processes
- File Management - Archive and file commands
- Deployment Guide - Server setup