Quick Overview
This workflow lets users manage Google Calendar by sending text or voice messages to a Zalo Official Account bot, transcribing voice notes with Google Gemini and using an OpenAI-powered agent to create, update, list, or delete events, then replying in Zalo with the result.
How it works
- Receives an incoming text or voice message through a Zalo Bot trigger.
- Sends a typing indicator back to the Zalo chat and normalizes key message fields (chat ID, type, text, and voice URL).
- If the message is a voice note, sends the audio URL to Google Gemini to transcribe it into text.
- Sends the combined text/transcription to an OpenAI chat model agent that interprets the request in Vietnamese and decides whether to list, create, update, or delete a Google Calendar event.
- Uses Google Calendar tools to get events and then create, update, or delete the targeted event based on the agent’s extracted parameters.
- Sends the agent’s Markdown-formatted response back to the user in Zalo, and posts an error message to Zalo if the agent run fails.
Setup
- Install the community node package
n8n-nodes-zalo-bot-official and restart n8n if required.
- Connect your Zalo Bot API credentials and configure the Zalo webhook URL in your Zalo Official Account so incoming messages reach this workflow.
- Add a Google Calendar OAuth2 credential and set the target calendar account (currently configured as
[email protected]) for all calendar operations.
- Add a Google Gemini (PaLM) API credential for audio transcription and ensure voice messages include a reachable
voice_url.
- Add an OpenAI API credential, select the chat model you want to use (currently
gpt-5-mini), and adjust the system prompt/tone if needed.