Turn chat messages into Google Calendar events

n8n is a visual, node-based automation platform that lets you automate tasks with drag-and-drop nodes. Task: n8n is a visual, node-based automation platform that lets you automate tasks with drag-and-drop nodes. It’s popular for multi-step automations and AI chains thanks to built-in nodes for agents and app integrations. In this tutorial, you’ll build a small personal calendar agent that listens to a chat message, extracts event details, and creates a Google Calendar entry. Along the way, you’ll learn how to set up n8n, add an AI Agent node, and pass structured data between nodes. Table of Contents Prerequisites How to Set Up Your n8n Account Prerequisites How to Set Up Your n8n Account How to Build a Personal Calendar Agent Step 1: Set Up the Chat Trigger Step 2: Configure the AI Agent Step 3: Add Google Calendar Node Step 4: Time to Test! How to Build a Personal Calendar Agent Step 1: Set Up the Chat Trigger Step 1: Set Up the Chat Trigger Step 2: Configure the AI Agent Step 2: Configure the AI Agent Step 3: Add Google Calendar Node Step 3: Add Google Calendar Node Step 4: Time to Test! Step 4: Time to Test! Conclusion Conclusion Prerequisites n8n account – setup steps below. n8n account – setup steps below. Google account – you’ll create events in Google Calendar. Google account – you’ll create events in Google Calendar. How to Set Up Your n8n Account You can setup n8n either on the cloud or locally. To set it up on the cloud (the easiest option), you can create a free trial account on the n8n website. If you’d rather self-host via npm, you can install the free n8n npm package and run it on your localhost (here are the steps for that). You can also self-host via Docker and run the n8n image on your machine. I’ll walk you through how to do that now. First, download and install the Docker Desktop application. Then click “Search Images” and select the n8nio/n8n image: Click run on the image and set your localhost port in the options. You should now be able to access n8n on your localhost. How to Build a Personal Calendar Agent Now for the fun part! We’re going to build a workflow that listens for a chat message, uses an AI Agent to understand the user's request, and automatically creates a Google Calendar event. This simple workflow highlights n8n’s new AI capabilities. Here’s a breakdown of the steps we’ll go through below: Add a Chat node to send a message to the agent. Add a Chat node to send a message to the agent. Let the AI Agent parse the message and extract key details (title, location, times). Let the AI Agent parse the message and extract key details (title, location, times). Create a Google calendar event with those details. Create a Google calendar event with those details. Step 1: Set Up the Chat Trigger Every workflow starts with a trigger. This is the event that kicks everything off. Use a chat trigger that listens for new messages. Visit the dashboard at https://<YOUR_USERNAME>.app.n8n.cloud/home/workflows and Click Create Workflow. Visit the dashboard at https://<YOUR_USERNAME>.app.n8n.cloud/home/workflows and Click Create Workflow. Click “Add first step..” and add On chat message as the trigger. Click “Add first step..” and add On chat message as the trigger. In the node's properties panel, Enable Make Chat Publicly Available (This will provide a URL which you can share with friends to book events on your calendar). In the node's properties panel, Enable Make Chat Publicly Available (This will provide a URL which you can share with friends to book events on your calendar). Step 2: Configure the AI Agent This node is the “brain” of the workflow. The AI Agent node can understand natural language, make decisions, and extract structured data. Each agent has 4 main modules: model, prompt, tools, and output. Click the + icon after the trigger node and add the AI Agent node. The AI Agent needs a model to power its reasoning. Click + below Chat Model and select OpenAI Chat Model node. Then select n8n free OpenAI API credits as your credential for now**.** In the future, you can sign up on the OpenAI Platform website and navigate to the "API keys" section to create a new secret key A tool is a connected node the agent can call during execution to perform actions (like fetching data, formatting dates, or running code) rather than only reasoning in text. We will be using the “Date Time” tool to convert the user readable date into a Unix Timestamp before calling the Google calendar API. Here are the steps to enable this tool: Click the + button below the AI Agent Tool Click the + button below the AI Agent Tool; tools: n8n. Human role: The original post does not say how a person stayed involved.; limitations: Prerequisites include an n8n account (cloud or self-hosted via Docker/npm) and a Google account. The tutorial mentions using n8n's free OpenAI API credits for initial setup, implying potential future costs or credential management needs. Source reliability is secondary as it is a how-to guide without performance data. Human approval is required for sharing the public chat URL..

Tools

n8n

Published on Agent Work Atlas:

Overview

n8n is a visual, node-based automation platform that lets you automate tasks with drag-and-drop nodes.

Workflow

n8n is a visual, node-based automation platform that lets you automate tasks with drag-and-drop nodes. It’s popular for multi-step automations and AI chains thanks to built-in nodes for agents and app integrations. In this tutorial, you’ll build a small personal calendar agent that listens to a chat message, extracts event details, and creates a Google Calendar entry. Along the way, you’ll learn how to set up n8n, add an AI Agent node, and pass structured data between nodes. Table of Contents Prerequisites How to Set Up Your n8n Account Prerequisites How to Set Up Your n8n Account How to Build a Personal Calendar Agent Step 1: Set Up the Chat Trigger Step 2: Configure the AI Agent Step 3: Add Google Calendar Node Step 4: Time to Test! How to Build a Personal Calendar Agent Step 1: Set Up the Chat Trigger Step 1: Set Up the Chat Trigger Step 2: Configure the AI Agent Step 2: Configure the AI Agent Step 3: Add Google Calendar Node Step 3: Add Google Calendar Node Step 4: Time to Test! Step 4: Time to Test! Conclusion Conclusion Prerequisites n8n account – setup steps below. n8n account – setup steps below. Google account – you’ll create events in Google Calendar. Google account – you’ll create events in Google Calendar. How to Set Up Your n8n Account You can setup n8n either on the cloud or locally. To set it up on the cloud (the easiest option), you can create a free trial account on the n8n website. If you’d rather self-host via npm, you can install the free n8n npm package and run it on your localhost (here are the steps for that). You can also self-host via Docker and run the n8n image on your machine. I’ll walk you through how to do that now. First, download and install the Docker Desktop application. Then click “Search Images” and select the n8nio/n8n image: Click run on the image and set your localhost port in the options. You should now be able to access n8n on your localhost. How to Build a Personal Calendar Agent Now for the fun part! We’re going to build a workflow that listens for a chat message, uses an AI Agent to understand the user's request, and automatically creates a Google Calendar event. This simple workflow highlights n8n’s new AI capabilities. Here’s a breakdown of the steps we’ll go through below: Add a Chat node to send a message to the agent. Add a Chat node to send a message to the agent. Let the AI Agent parse the message and extract key details (title, location, times). Let the AI Agent parse the message and extract key details (title, location, times). Create a Google calendar event with those details. Create a Google calendar event with those details. Step 1: Set Up the Chat Trigger Every workflow starts with a trigger. This is the event that kicks everything off. Use a chat trigger that listens for new messages. Visit the dashboard at https://<YOUR_USERNAME>.app.n8n.cloud/home/workflows and Click Create Workflow. Visit the dashboard at https://<YOUR_USERNAME>.app.n8n.cloud/home/workflows and Click Create Workflow. Click “Add first step..” and add On chat message as the trigger. Click “Add first step..” and add On chat message as the trigger. In the node's properties panel, Enable Make Chat Publicly Available (This will provide a URL which you can share with friends to book events on your calendar). In the node's properties panel, Enable Make Chat Publicly Available (This will provide a URL which you can share with friends to book events on your calendar). Step 2: Configure the AI Agent This node is the “brain” of the workflow. The AI Agent node can understand natural language, make decisions, and extract structured data. Each agent has 4 main modules: model, prompt, tools, and output. Click the + icon after the trigger node and add the AI Agent node. The AI Agent needs a model to power its reasoning. Click + below Chat Model and select OpenAI Chat Model node. Then select n8n free OpenAI API credits as your credential for now**.** In the future, you can sign up on the OpenAI Platform website and navigate to the "API keys" section to create a new secret key A tool is a connected node the agent can call during execution to perform actions (like fetching data, formatting dates, or running code) rather than only reasoning in text. We will be using the “Date Time” tool to convert the user readable date into a Unix Timestamp before calling the Google calendar API. Here are the steps to enable this tool: Click the + button below the AI Agent Tool Click the + button below the AI Agent Tool

Reported result

The source is a tutorial and does not report actual business outcomes, success rates, or measured results from a live deployment. It only describes the steps to build the automation. A measurable acceptance check would be: successfully creating a Google Calendar event from a natural language chat message in a test environment.

Human role

The original post does not say how a person stayed involved.

Limitations

Prerequisites include an n8n account (cloud or self-hosted via Docker/npm) and a Google account. The tutorial mentions using n8n's free OpenAI API credits for initial setup, implying potential future costs or credential management needs. Source reliability is secondary as it is a how-to guide without performance data. Human approval is required for sharing the public chat URL.

Try it

Act as an automation engineer. I need to set up a personal calendar agent using n8n. Inputs: - n8n instance URL: [replaceable n8n URL] - OpenAI API Key: [replaceable key] - Google Calendar OAuth credentials: [replaceable credentials] - Target calendar ID: [replaceable calendar ID] Steps: 1. Create a new workflow in n8n. 2. Add an 'On chat message' trigger node and enable 'Make Chat Publicly Available'. 3. Add an 'AI Agent' node. Configure it with the OpenAI Chat Model using the provided API key. 4. Add a 'Date Time' tool to the AI Agent to convert natural language dates to Unix timestamps. 5. Add a 'Google Calendar' node configured to create events using the extracted title, time, and location. 6. Perform a dry run with a sample message: 'Book a meeting with John tomorrow at 3pm in Room A'. 7. Verify the event was created in the target calendar. 8. Stop and ask for my confirmation before sharing the public chat URL. Output: A screenshot of the successful workflow execution and the created calendar event details. If any step fails, report the specific error message from n8n.

Original source

Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.

More cases · Everyday life