Welcome to ASAB Iris, your go-to multifunctional messenger microservice, designed for automated document rendering and message dispatching across various communication channels!
Overview
- Craft beautiful emails with templates using Jinja, Markdown, or HTML.
- Personalize recipient details or go with default configurations.
- Trigger them through a web handler or an Apache Kafka message - flexibility is key!
Configuration
[smtp]
host=smtp.example.com
user=admin
password=secret
from=info@example.com
ssl=no
starttls=yes
subject=Mail from ASAB Iris
Explanation
host
: Your SMTP server's address.user
: Your username for the SMTP server.password
: Your super-secret password.from
: The default "From" address for your emails.ssl
:yes
/no
for SSL, depends on the SMTP server.starttls
:yes
/no
for STARTTLS, depends on the SMTP server.subject
: The default subject line, if not provided by a caller or a template.
Configuration
[email]
markdown_wrapper=/Templates/Email/body_wrapper.html
markdown_wrapper
: Specifies the path to the HTML template for wrapping email content. If this configuration is not provided, or if the value is left empty, the markdown_wrapper will default to None. In such cases, Markdown-formatted emails will be sent without any additional HTML wrapping. This means the emails will consist solely of the content converted from Markdown to HTML, without any extra styling or structure provided by a wrapper template.
Overview
- Send messages to a Slack via HTTP REST API or through Kafka Topic
- Apply Jinja2 templates.
- Trigger them through a web handler or an Apache Kafka message - flexibility is key!
Configuration
[slack]
token=xoxb-111111111111-2222222222222-3333333333333voe
channel=general
Explanation
token
: Your Slack OAuth access token.channel
: The Slack channel you want to send messages to.
- A Slack workspace where you're the admin of app creation.
- Visit the Slack API website.
- Select "Create New App".
- Name your app and choose its home (workspace).
- Select "Create App"
- Configure "OAuth & Permissions".
- Add the necessary scopes:
chat:write
,files:write
,files:read
andchannels:read
. - Select "Install to Workspace".
- "Allow"
- Copy the OAuth access token.
Add following scopes for:
groups:read
: for posting to private channelsim:read
: for posting to direct messsagesmpim:read
: for posting to group direct messages
- Choose a channel in your Slack workspace.
- Invite the app.
- Search for your app and select it.
- Confirm the addition.
- Verify the app's presence.
Overview
- Send messages to a Microsoft Teams via HTTP REST API or thru Kafka Topic
- Apply Jinja2 templates.
- Trigger them through a web handler or an Apache Kafka message - flexibility is key!
Configuration
[outlook]
webhook_url=https://outlook.office.com/webhook/...
Explanation
webhook_url
: Your webhook URL.
asab-iris implements specific error handling strategies for the Kafka and Web handlers to ensure robustness and reliability.
- Fallback Mechanism: In case of errors during message processing, a fallback mechanism is triggered. This ensures that the system can still operate or recover gracefully when encountering issues.
- General Error Logging: Any errors during message dispatching are logged as exceptions.
- Error Responses: Internal error codes are mapped to HTTP status codes, providing meaningful responses to clients.
- Exception Handling: General exceptions are logged, and standardized error responses are sent to clients.
- Inbound: HTTP REST API
- Inbound: Apache Kafka
- Jinja2 for template specifications
- Markdown for templates
- HTML for templates and the output
- PDF for the output
- Output: Email SMTP
- Output: Slack
- Output: Microsoft Teams
- Powered by ASAB (because we’re standing on the shoulders of giants)
Diagram: Architecture