This project is a Go AWS Lambda container that receives bank transaction SMS payloads over HTTP, parses them with a Python spaCy worker, and appends the parsed transaction to Google Sheets.
- Accepts
POSTrequests only - Validates
x-auth-tokenagainst theAUTH_TOKENenvironment variable - Parses the JSON request body
- Resolves the bank config from the SMS sender
- Sends the SMS text to the Python parser over stdin/stdout
- Appends the parsed transaction to the configured Google Sheet
Expected JSON:
{
"sender": "NationsSMS",
"message": "A TRANSACTION of LKR 1,185.94 was approved on your A/C No. 200680****580 at UBER EATS CBH. Current Bal LKR 95200.23",
"received_at": "2026-02-04T12:34:56Z",
"device_id": "pixel-8"
}received_at must be RFC3339.
config.yml uses this shape:
spreadsheet:
url: ""
sheet_name: Transactions
banks:
- name: "NTB"
senders:
- "^NationsSMS$"Each bank entry contains:
name: bank name written to the sheetsenders: one or more sender regex patterns
AUTH_TOKEN: shared secret expected in thex-auth-tokenheaderGOOGLE_CREDENTIALS_JSON: Google service account JSONSPREADSHEET_URL: optional override forconfig.ymlspreadsheet URLPARSER_PYTHON: optional Python executable for the parser worker, for example./.venv/bin/python
Rows are appended to Google Sheets in this order:
received_atamountdirectiondescriptionaccount_masksenderdevice_idbank_name
make test
make vet
make fmt
make build
make docker-buildmake build creates dist/lambda/bootstrap.
make docker-build creates the Lambda container image sms-ingest:local.
Run the app as a normal local HTTP server:
LOCAL_HTTP=1 PARSER_PYTHON=python go run ./cmd/sms-ingestOr use the Makefile target, which reads .env and defaults PARSER_PYTHON locally:
make run-localDefault local URL:
http://localhost:8080/
You can override the port with PORT.
Example:
curl -X POST http://localhost:8080/ \
-H 'Content-Type: application/json' \
-H 'x-auth-token: your-auth-token' \
-d '{
"sender":"NationsSMS",
"message":"A TRANSACTION of LKR 1,185.94 was approved on your A/C No. 200680****580 at UBER EATS CBH. Current Bal LKR 95200.23",
"received_at":"2026-02-04T12:34:56Z",
"device_id":"pixel-8"
}'- Persist parsing errors