| nodes |
[{"parameters":{"httpMethod":" [{"parameters":{"httpMethod":"POST","path":"90a0336c-1494-4dee-a60e-e38a3be9efa4","options":{}},"type":"n8n-nodes-base.webhook","typeVersion":2.1,"position":[-1232,-64],"id":"0c7a54c7-89bb-4afc-843c-4ea814987085","name":"Webhook","webhookId":"90a0336c-1494-4dee-a60e-e38a3be9efa4"},{"parameters":{"method":"POST","url":"https://bot-api.zaloplatforms.com/bot3156877265157226795:oLYUlciXejAGMOMvVmvPsXyLxugQpVuaaYHxPSRVqCieQRYsIXeKVWFKLVLOXJvA/setWebhook","sendBody":true,"bodyParameters":{"parameters":[{"name":"url","value":"https://nhacviec.io.vn/webhook/90a0336c-1494-4dee-a60e-e38a3be9efa4"},{"name":"secret_token","value":"hong1234"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.5,"position":[-448,-432],"id":"fa2bca56-a2e0-47d1-94d5-c0322fca05ec","name":"Set Webhook"},{"parameters":{},"type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[-1008,-64],"id":"5f2adf75-7a5e-4cf3-86f1-52533619df17","name":"Wait","webhookId":"ffaf6cd2-ec22-405a-9118-d6f49413a5e1"},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"leftValue":"={{ $('Webhook').item.json.body.message.message_type }}","rightValue":"CHAT_PHOTO","operator":{"type":"string","operation":"equals"},"id":"b3a65a6c-7e5c-4afb-8caa-922d8b487230"}],"combinator":"and"},"renameOutput":true,"outputKey":"Photo"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"2071a0a5-ac82-452c-80bc-5e0615d9a344","leftValue":"={{ $('Webhook').item.json.body.message.message_type }}","rightValue":"share.file","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"PDF"}]},"options":{}},"type":"n8n-nodes-base.switch","typeVersion":3.2,"position":[-608,-64],"id":"a89423e9-f935-40b1-a39b-b29364fe480f","name":"Switch"},{"parameters":{"documentType":"image_url","options":{}},"type":"n8n-nodes-base.mistralAi","typeVersion":1,"position":[160,-144],"id":"8167acb0-ffad-4688-b18e-55b7afb6714f","name":"Extract IMG","credentials":{"mistralCloudApi":{"id":"YjNytnj56U2VFsH0","name":"Mistral Cloud account"}}},{"parameters":{"url":"={{ $('Webhook').item.json.body.message.photo_url }}","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.4,"position":[-64,-144],"id":"ef8e058f-b87e-486f-a02b-cf700dd9e6ed","name":"Get IMG"},{"parameters":{"assignments":{"assignments":[{"id":"69aa03b7-671a-47d5-9561-5a0213c2fe65","name":"text","value":"={{ $json.pages[0].markdown }}","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[512,-96],"id":"1811f998-d7dd-4631-95d1-a58bff38014f","name":"Edit Fields"},{"parameters":{"promptType":"define","text":"={{ $json.text }}","needsFallback":true,"options":{"systemMessage":"=Bạn là một trợ lý chuyên nghiệp.\nHãy phân tích, tóm tắt và nhập các thông tin vào Google Calendar.\nTrả về dữ liệu có cấu trúc sau cho người dùng, dạng text thuần túy, không phải Markdown:\n\n- Tiêu đề:\n- Thời gian:\n- Địa điểm:\n- Nội dung tóm tắt:\n- Link google calendar:"}},"type":"@n8n/n8n-nodes-langchain.agent","typeVersion":2.2,"position":[816,-96],"id":"81a73951-249e-4444-9a47-161eadb7a0f9","name":"AI Agent","onError":"continueErrorOutput"},{"parameters":{"calendar":{"__rl":true,"value":"hoanggiaovien2026@gmail.com","mode":"list","cachedResultName":"hoanggiaovien2026@gmail.com"},"start":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', `(GMT+07:00) Asia/Ho_Chi_Minh`, 'string') }}","end":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `(GMT+07:00) Asia/Ho_Chi_Minh`, 'string') }}","additionalFields":{"description":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}","location":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}","summary":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}"}},"type":"n8n-nodes-base.googleCalendarTool","typeVersion":1.3,"position":[1056,128],"id":"2adc7e84-83fe-4f73-a5ed-1c7052500ebc","name":"Create an event in Google Calendar","credentials":{"googleCalendarOAuth2Api":{"id":"BlAI0BHbdgcKZN6b","name":"hoanggiaovien2026@gmail.com"}}},{"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1-mini"},"options":{}},"type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1.2,"position":[656,128],"id":"d6deb3d2-e250-47c0-a1ab-992209db2d72","name":"OpenAI Chat Model","credentials":{"openAiApi":{"id":"v5NxhTmXpMWSe8nd","name":"OpenAI account"}}},{"parameters":{"modelName":"models/gemini-2.5-pro","options":{}},"type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","typeVersion":1,"position":[848,128],"id":"6b40887a-7149-4bde-be54-473c348b7a61","name":"Google Gemini Chat Model","credentials":{"googlePalmApi":{"id":"su7zMLYMOp13bt1l","name":"Google Gemini(PaLM) Api account"}}},{"parameters":{"assignments":{"assignments":[{"id":"53ffd6ef-4993-4623-996f-5eb9880c7019","name":"token","value":"3156877265157226795:oLYUlciXejAGMOMvVmvPsXyLxugQpVuaaYHxPSRVqCieQRYsIXeKVWFKLVLOXJvA","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.5,"position":[-800,-64],"id":"a4ecc0a4-5559-4a77-af99-ab5fbc1306ad","name":"Set Data"},{"parameters":{"method":"POST","url":"=https://bot-api.zaloplatforms.com/bot{{ $('Set Data').item.json.token }}/sendMessage","sendBody":true,"bodyParameters":{"parameters":[{"name":"chat_id","value":"={{ $('Webhook').item.json.body.message.chat.id }}"},{"name":"text","value":"Đang phân tích hình ảnh"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.5,"position":[-336,-144],"id":"dc1e8126-1f2e-4f1e-a550-de9840bf81f0","name":"Send Message Image"},{"parameters":{"method":"POST","url":"=https://bot-api.zaloplatforms.com/bot{{ $('Set Data').item.json.token }}/sendMessage","sendBody":true,"bodyParameters":{"parameters":[{"name":"chat_id","value":"={{ $('Webhook').item.json.body.message.chat.id }}"},{"name":"text","value":"Đang tóm tắt nội dung & cập nhật vào Google Calendar"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.5,"position":[816,-288],"id":"5b2ac8b9-d5bb-445a-9f7f-11561f7bb43c","name":"Send Message"},{"parameters":{"method":"POST","url":"=https://bot-api.zaloplatforms.com/bot{{ $('Set Data').item.json.token }}/sendMessage","sendBody":true,"bodyParameters":{"parameters":[{"name":"chat_id","value":"={{ $('Webhook').item.json.body.message.chat.id }}"},{"name":"text","value":"={{ $json.output }}"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.5,"position":[1232,-144],"id":"9d37d16c-9b89-46c3-9383-2569a2f16774","name":"Send Success"}]... |
| connections |
{"Webhook":{"main":[[{"node {"Webhook":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Wait":{"main":[[{"node":"Set Data","type":"main","index":0}]]},"Get IMG":{"main":[[{"node":"Extract IMG","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Send Message Image","type":"main","index":0}]]},"Extract IMG":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"Create an event in Google Calendar":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":1}]]},"Edit Fields":{"main":[[{"node":"AI Agent","type":"main","index":0},{"node":"Send Message","type":"main","index":0}]]},"Set Data":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Send Message Image":{"main":[[{"node":"Get IMG","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"Send Success","type":"main","index":0}]]}}... |