"={{ $fromAI('after', 'The earliest datetime we want to look for events for') }}",
timeMax:"={{ $fromAI('before', 'The latest datetime we want to look for events for') }}",
query:
"={{ $fromAI('query', 'The search query to look for in the calendar. Leave empty if no search query is needed') }}",
singleEvents: true,
},
},
},
{
id:'5b410409-5b0b-47bd-b413-5b9b1000a063',
name:'When chat message received',
type:'@n8n/n8n-nodes-langchain.chatTrigger',
typeVersion: 1.1,
position:[360,20],
webhookId:'a889d2ae-2159-402f-b326-5f61e90f602e',
parameters:{
options:{},
},
},
{
id:'29963449-1dc1-487d-96f2-7ff0a5c3cd97',
name:'AI Agent',
type:'@n8n/n8n-nodes-langchain.agent',
typeVersion: 1.7,
position:[560,20],
parameters:{
options:{
systemMessage:
"=You're a helpful assistant that the user to answer questions about their calendar.\n\nToday is {{ $now.format('cccc') }} the {{ $now.format('yyyy-MM-dd HH:mm') }}.",
},
},
},
{
id:'eae35513-07c2-4de2-a795-a153b6934c1b',
name:'Sticky Note',
type:'n8n-nodes-base.stickyNote',
typeVersion: 1,
position:[0,0],
parameters:{
content:
'## 👋 Welcome to n8n!\nThis example shows how to build an AI Agent that interacts with your \ncalendar.\n\n### 1. Connect your accounts\n- Set up your [OpenAI credentials](https://docs.n8n.io/integrations/builtin/credentials/openai/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modal) in the `OpenAI Model` node\n- Connect your Google account in the `Google Calendar` node credentials section\n\n### 2. Ready to test it?\nClick Chat below and start asking questions! For example you can try `What meetings do I have today?`',
height: 389,
width: 319,
color: 6,
},
},
{
id:'68b59889-7aca-49fd-a49b-d86fa6239b96',
name:'Sticky Note1',
type:'n8n-nodes-base.stickyNote',
typeVersion: 1,
position:[820,200],
parameters:{
content:
"\n\n\n\n\n\n\n\n\n\n\n\nDon't have **Google Calendar**? Simply exchange this with the **Microsoft Outlook** or other tools",
'### Want to learn more?\nWant to learn more about AI and how to apply it best in n8n? Have a look at our [new tutorial series on YouTube](https://www.youtube.com/watch?v=yzvLfHb0nqE&lc).',