Library / AI Agents & Assistants
AI Agents & Assistants
Delegate and track WhatsApp tasks with WhatsApp, Google Sheets and OpenAI
When an API call/webhook arrives, it runs an AI agent with OpenAI / ChatGPT using Postgres, Google Drive, Google Sheets.
What it does
# WhatsApp task delegation agent with Google Sheets A task system that lives entirely in WhatsApp. A supervisor messages the bot to create and track tasks, assignees reply to the task message with progress or a photo as proof, and everything is written to a Google Sheet. Two AI agents handle the two sides of the conversation. ### How it works 1. A webhook receives every WhatsApp message from a WAHA server. One config node holds all chat IDs and API details. 2. Messages from the supervisor go to the supervisor agent. Everything else is checked, with the bot's own messages and status broadcasts ignored. 3. The supervisor agent creates and updates tasks, answers status questions and saves contacts through Google Sheets tools, then replies in the same chat. 4. Assignee replies must quote the original task message so the task ID can be found. A reply without a quote gets asked to use the quote feature. 5. The assignee agent works in any language, decides whether the task is done, ongoing or not started, and updates the sheet. 6. A photo sent as proof is saved to Google Drive and forwarded to the supervisors with the update. Text only updates go straight through. ### Setup 1. Connect your OpenAI, Google Sheets, Google Drive and Postgres credentials. Postgres stores the chat memory. 2. Open Set config and fill in your WAHA server address, API key, session name, and the chat IDs of your supervisors and of the bot number itself. 3. Replace YOUR_GOOGLE_SHEET_ID with your sheet, containing a Task tab and a Contacts tab, and YOUR_DRIVE_FOLDER_ID with a folder for proof photos. 4. Point your WAHA webhook at this workflow's production URL. ### Customization Edit the status rules in the assignee tools to match your own task statuses.
The steps
- Update task status tool
- Read tasks tool
- Read tasks tool (assignee)
- Create task tool
- Read contacts tool
- Save contact tool
- Update task tool
- Receive WhatsApp message
- From the supervisor?
- Ask them to quote the task
- Message has text?
- Is it a reply to a task?
- Ignore bot and status messages
- Reply to the supervisor
27 steps in total.
Similar automations
AI Agents & AssistantsHandle WhatsApp HVAC reception with Gemini, Claude, and Meta WhatsApp API27 stepsAI Agents & AssistantsDelegate Story Writing to a Gemini Sub-Agent4 stepsAI Agents & AssistantsConfirm Clinic Appointments via Telegram and WhatsApp AI31 stepsData Sync & ETLManage WhatsApp and Telegram business ops with OpenAI, Postgres and Sheets43 steps