Lightweight support desk with Telegram and Postgres database tracking
01 Telegram Trigger: Intake + Status
02 Switch: Route by Command
03a FN: Normalize + Hash
04a DB: Upsert Ticket
postgres
05a Telegram Ack
telegram
03b FN: Parse Status Command
04b DB: Get Ticket Status
postgres
05b Telegram: Status Reply
telegram
03b1 IF: Has Correlation ID
05b Telegram: Status Reply (Error)
telegram
Telegram: Invalid Command
telegram
03c FN: Parse Update Command
03c1 IF: Has Correlation ID
Send a text message
telegram
03c2 IF: Valid Status
05c Telegram: Invalid Status
telegram
04c DB: Update Ticket Status
postgres
03c0 IF: Is Operator
05c0 Telegram: Unauthorized Update Attempt
telegram
04c1 DB: Get Ticket Owner
postgres
04b1 IF: Ticket Belongs To User
05b1 Telegram: Unauthorized Status Check
telegram
04c1a IF: Resolved or In Progress
05c1a Telegram: Notify Resolved
telegram
05c1b Telegram: Notify In Progress
telegram
05c Telegram: Update Confirmation
telegram
04b0 IF: DB Lookup Failed?
05b0 Telegram: Status DB Error
telegram
05c0 IF: Operator Reply Failed?
Telegram: Admin Alert — Operator Reply Failed
telegram
Notify Failed?
Execute a SQL query
postgres
04c2 DB: Insert Audit Row
postgres
04b1 IF: No Ticket Found
Send a text message1
telegram
03b IF: Has Valid Correlation ID Format
Send a text message2
telegram
Welcome Message
telegram
Send a text message3
telegram
Check Admin
DB: List Tickets
postgres
Send a text message4
telegram
Code in JavaScript
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.