Generic webhook handler bot for Delta Chat
Find a file
2026-02-22 10:55:33 +01:00
deltachat-core-rust@e34687ba42 fix(build): deltachat is now a git module 2025-12-03 01:35:58 +01:00
src feat: Customize command symbol 2026-02-22 10:55:33 +01:00
.dir-locals.el docs: update project name 2025-12-02 19:25:46 +01:00
.envrc style: cleanup 2025-12-03 23:48:35 +01:00
.gitignore feat(docs): Init README 2025-12-23 10:11:46 +01:00
.gitmodules fix(build): deltachat is now a git module 2025-12-03 01:35:58 +01:00
Cargo.lock feat: added attachment field 2025-12-30 23:59:10 +01:00
Cargo.toml feat: added attachment field 2025-12-30 23:59:10 +01:00
channels-lock.scm feat: update build env 2025-12-02 19:26:21 +01:00
channels.scm Initial commit 2025-11-27 19:53:15 +01:00
config.yaml feat: added attachment field 2025-12-30 23:59:10 +01:00
delta-fastbot.yaml feat: added attachment field 2025-12-30 23:59:10 +01:00
docker-compose.yaml feat: added example docker-compose 2025-12-27 18:37:32 +01:00
guix.scm fix(guix): typo on license 2025-12-03 23:52:42 +01:00
LICENSE feat: update license to GPLv3 2025-12-03 23:47:24 +01:00
Makefile fix: SSL certs in container 2026-02-22 10:55:11 +01:00
manifest.scm style: cleanup 2025-12-03 23:48:35 +01:00
README.md feat: Added custom commands 2025-12-29 01:19:10 +01:00

Delta Fastbot

Delta Fastbot is a generic and extensible bot for Delta Chat, designed to be easily configurable through a YAML file. Its goal is to act as a flexible automation layer between Delta Chat and external systems.


Features

  • The bot can send messages to any configured Delta Chat conversation (private chats and groups)
  • All target chats are defined by providing the Delta Chat QR text in the configuration
  • Support for JSON webhooks with fully customizable message formatting defined in the YAML configuration
  • PostgreSQL hooks for database events:
    • INSERT, UPDATE, DELETE, and TRUNCATE events
    • Selection of custom columns from affected rows
    • Message composition using templates written directly in the YAML configuration
  • Admin chat interface, the !help command will list available commands
  • Custom commands that can send chat data to a url, using a POST request

Configuration

The bot is configured using a single YAML file, you can find a reference YAML in the delta-fastbot.yaml file.

The configuration defines:

  • Enabled integrations
  • Webhook behavior
  • Database event subscriptions
  • Mapping between events and Delta Chat conversations
  • Custom commands

Usage

Delta Fastbot requires a single environment variable to run: DELTA_FASTBOT_CONFIG, this variable must contain the path to the YAML configuration file. If it is not set, the bot will default to: ./delta-fastbot.yaml

On startup, Delta Fastbot prints a Delta Chat QR link that can be used to start a private conversation with the bot.

During the first startup, the bot also generates a one-time admin token and prints a message that must be sent to the bot to register the first administrator. This token is valid only once and is automatically invalidated after the first usage.

After at least one administrator has been registered, additional admin tokens can be generated by existing admins using the chat command !new_admin_token.

Logging

If you want to enable logs, the recommended environment variable is the one already used in the project direnv:

RUST_LOG=pgp=error,deltachat=error,rustls=error,debug

This setup keeps noisy dependencies quiet while preserving useful debug output for the bot itself.

Running the bot

If Delta Fastbot has been installed via Guix, you can simply run the delta-fastbot commands.

From inside the project directory, you can start it using Cargo:

cargo run --release

Build

The development environment is defined declaratively in manifest.scm, using Guix.

The most convenient method to access the development environment is to use direnv on the host machine. With direnv installed and enabled in your shell, the project directory will automatically load the Guix environment described in manifest.scm upon entry, and unload it when leaving the directory. This avoids running guix shell ... manually each time.

Without direnv, to manually enter in the development environment:

guix time-machine -C channels-lock.scm -- shell -m manifest.scm

Whenever the dependencies change, you can update the development shell with:

make update-env

To build the bot, run:

cargo build --release

Or, to directly use the Guix packaging system:

guix build -L . delta-fastbot

To build the OCI image, you can simply run:

make build-container

When the build finishes you will notice a path /gnu/store/...-delta-fastbot-docker-pack.tar.gz in the command output. You can load it with

docker load << PATH

Where PATH is the path you found in the output.

Roadmap

Planned features:

  • RSS feed registration and periodic updates
  • In-chat configuration directly from Delta Chat
  • Creation and management of broadcast channels
  • API monitor that watches a JSON endpoint and sends notifications when updates are detected
  • Per-user configuration
  • Expose directly as a Guix System service

License

Delta Fastbot is released under the GNU General Public License (GPL). See the LICENSE file for full details.