Skip to content

OliverLDS/dispatchr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dispatchr

dispatchr is a lightweight outbound communication package for agentic workflows.

Current channels:

  • Email via Gmail SMTP using emayili
  • X posting with OAuth 1.0a signing
  • Telegram bot messaging

The package is intentionally narrow. It focuses on sending and posting rather than building a full communication framework.

Installation

# install.packages("pak")
pak::pak("OliverLDS/dispatchr")

Configuration

Each user-facing function accepts an explicit config = list(...). Missing fields are filled from environment variables when available.

Email

Required fields:

  • from
  • password

Optional fields:

  • host defaults to smtp.gmail.com
  • port defaults to 587

Environment variables:

  • DISPATCHR_EMAIL_FROM
  • DISPATCHR_EMAIL_PASSWORD
  • DISPATCHR_EMAIL_HOST
  • DISPATCHR_EMAIL_PORT

X

Required fields:

  • api_key
  • api_secret
  • access_token
  • access_secret

Environment variables:

  • DISPATCHR_X_API_KEY
  • DISPATCHR_X_API_SECRET
  • DISPATCHR_X_ACCESS_TOKEN
  • DISPATCHR_X_ACCESS_SECRET

Telegram

Required fields:

  • bot_token
  • chat_id

Optional fields:

  • parse_mode

Environment variables:

  • DISPATCHR_TELEGRAM_BOT_TOKEN
  • DISPATCHR_TELEGRAM_CHAT_ID
  • DISPATCHR_TELEGRAM_PARSE_MODE

Examples

library(dispatchr)

send_email(
  to = "friend@example.com",
  subject = "Hello",
  body = "Sent from dispatchr",
  config = list(
    from = Sys.getenv("DISPATCHR_EMAIL_FROM"),
    password = Sys.getenv("DISPATCHR_EMAIL_PASSWORD")
  )
)
post_x(
  text = "Hello from dispatchr",
  config = list(
    api_key = Sys.getenv("DISPATCHR_X_API_KEY"),
    api_secret = Sys.getenv("DISPATCHR_X_API_SECRET"),
    access_token = Sys.getenv("DISPATCHR_X_ACCESS_TOKEN"),
    access_secret = Sys.getenv("DISPATCHR_X_ACCESS_SECRET")
  )
)
send_telegram(
  text = "Hello from dispatchr",
  config = list(
    bot_token = Sys.getenv("DISPATCHR_TELEGRAM_BOT_TOKEN"),
    chat_id = Sys.getenv("DISPATCHR_TELEGRAM_CHAT_ID")
  )
)

Return values

The main send/post functions return a structured list with:

  • ok
  • channel
  • action
  • request_summary
  • response
  • error
  • rate_limit

Scope notes

Telegram chat sync is deliberately not part of the core exported API in this version. The package is currently centered on outbound delivery only.

About

Lightweight outbound messaging for agentic workflows in R, with support for Gmail SMTP, X posting, and Telegram bots.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages