Back to all projects

Automation Workflow Engine.

Event-driven operational pipeline connecting Discord and Telegram chat triggers with self-hosted n8n orchestrators, Google Apps Script backends, and automated PDF document generation.

Overview & Problem Solved

Manual business administration tasks like updating spreadsheets, verifying incoming transaction receipts, and compiling daily status PDFs consume substantial operational hours. This engine transforms operational chats into direct, authenticated database actions without human intermediary steps.

System Architecture

The architecture orchestrates four interconnected modules:

  • Chat Gateway: Discord / Telegram bot listeners verifying user permissions and parsing command intents.
  • n8n Orchestrator: Self-hosted workflow pipeline managing conditional branching, data sanitization, and error retries.
  • Google Apps Script: Web app endpoints updating Google Sheets records and assembling Google Docs reports.
  • PDF Engine: Automated document rendering exported straight to cloud drives with instant reply links.

Implementation Logic

The bridge handles authenticated payloads and appends audit trails:

1function doPost(e) {
2 const payload = JSON.parse(e.postData.contents);
3 const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Logs");
4 sheet.appendRow([new Date(), payload.user_id, payload.action, payload.summary]);
5 return ContentService.createTextOutput(JSON.stringify({ status: "success" }));
6}

Operational Outcomes

100%
Automated Audit
< 3s
Processing Time
Zero
Manual Errors