Query expenses on Telegram with GPT-4.1 and Google Sheets
MSG | Telegram Inbound
LLM | Parse Intent
openai
JS | Extract Intent JSON
GS | Load Expenses
googleSheets
GS | Load Categories
googleSheets
JS | Filter & Aggregate
JS | Format Response Message
TG | Send Reply
telegram
MERGE | Combine Expenses + Categories
IF | User Authorized?
SPLIT | Split Categories
splitOut
GS | Read Category Mapping
googleSheets
MERGE | Join Categories with Mapping
TG | Confirm Category Suggestion
telegram
GS | Read Allowed Categories
googleSheets
SET | Normalize Category
MERGE | Check Category against Allowed
IF | Category Known?
LLM | Classify Category
openai
MERGE | Combine Categories with List
SET | Extract LLM Category
IF | Category Suggestion Accepted?
GS | Save Category Mapping
googleSheets
MERGE | Loop Entry (Category)
SET | Set Resolved Category
SET | Assemble Resolved Intent
AGG | Aggregate Category List
aggregate
LOOP | Iterate Categories
noOp
SET | Set New+Old Category (LLM)
JS | Build Category Inline Buttons
WAIT | Wait for Category Selection
noOp
HTTP | Send Category Selection Message
api.telegram.org
SET | Read Callback Body (Cat.)
SET | Set New+Old Category (Selection)
MERGE | Combine Category Mapping Entries
HTTP | Forward Category Selection
TG | Confirm Category Selection
telegram
JS | Read Category Callback
IF | Message or Callback?
IF | Category Present?
MERGE | Combine Category + Person
AGG | Aggregate Resolved Categories
aggregate
IF | Person Present?
SPLIT | Split Persons
splitOut
MERGE | Join Persons with Mapping
SET | Normalize Person
MERGE | Check Person against Allowed
IF | Person Known?
MERGE | Combine Persons with List
AGG | Aggregate Person List
aggregate
GS | Read Person Mapping
googleSheets
GS | Read Allowed Persons
googleSheets
TG | Confirm Person Suggestion
telegram
LLM | Classify Person
openai
SET | Extract LLM Person
IF | Person Suggestion Accepted?
GS | Save Person Mapping
googleSheets
LOOP | Iterate Persons
noOp
SET | Set New+Old Person (LLM)
JS | Build Person Inline Buttons
WAIT | Wait for Person Selection
noOp
HTTP | Send Person Selection Message
api.telegram.org
SET | Read Callback Body (Person)
SET | Set New+Old Person (Selection)
MERGE | Combine Person Mapping Entries
MERGE | Loop Entry (Person)
SET | Set Resolved Person
MERGE | Combine Person Mapping
IF | Category or Person Callback?
HTTP | Forward Person Selection
TG | Confirm Person Selection
telegram
JS | Read Person Callback
JS | Merge Intent Fields
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.