├── README.md ├── scrap-mitra10-price.json ├── chatwoot-ai-agent.json ├── whatsapp-ai-google-calendar.json ├── ai-news-whatsapp-channel.json ├── voice-ai-agent-maia-router.json ├── google-sheets-to-data-tables-migration.json ├── simple-rag.json ├── biteship-ongkir-chatbot.json ├── ai-wordpress-post-maker.json ├── ai-accounting-staff.json ├── whatsapp-waha-hold-chat.json ├── hr-ai-agent.json └── ssh-ai-agent.json /README.md: -------------------------------------------------------------------------------- 1 | # n8n-templates 2 | 3 | A chill collection of my favorite n8n automation. Ready to import, remix, and run 🤖 🚀 4 | 5 | --- 6 | 7 | ## 📂 What's Inside 8 | 9 | This repo is just a flat collection of `.json` files-each one an exported n8n workflow. No nested folders, no surprises. Grab any file you like and import it straight into your n8n instance. 10 | 11 | --- 12 | 13 | ## 🛠️ Prerequisites 14 | 15 | - **n8n** installed (self-hosted or Desktop App). 16 | - Node.js ≥ v14 if you’re running n8n locally. 17 | - Basic familiarity with n8n’s UI (credentials, triggers, nodes). 18 | 19 | --- 20 | 21 | ## 🔄 Importing Workflows 22 | 23 | ### Via the UI 24 | 25 | - In your n8n dashboard, click Workflows in the side menu. 26 | - Hit the Import button (top right). 27 | - Navigate to your cloned folder and select any .json file. 28 | - Click Import → voilà, your flow appears. 29 | - Toggle Activate if you want it to run on its trigger. 30 | 31 | ### Via CLI 32 | 33 | ```console 34 | n8n import:workflow --input=./any-workflow.json 35 | ``` 36 | 37 | --- 38 | 39 | #### Happy automating! ✨ 40 | -------------------------------------------------------------------------------- /scrap-mitra10-price.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Scrap Mitra10 Website Price", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "rule": { 7 | "interval": [ 8 | { 9 | "field": "hours" 10 | } 11 | ] 12 | } 13 | }, 14 | "type": "n8n-nodes-base.scheduleTrigger", 15 | "typeVersion": 1.2, 16 | "position": [ 17 | -576, 18 | 0 19 | ], 20 | "id": "01c660c9-b8cb-41c3-8b88-506ee9258d21", 21 | "name": "Schedule Every Hour" 22 | }, 23 | { 24 | "parameters": { 25 | "url": "https://www.mitra10.com/durawood-spc-al8009-dark-maple-box-2-23m2", 26 | "options": {} 27 | }, 28 | "type": "n8n-nodes-base.httpRequest", 29 | "typeVersion": 4.2, 30 | "position": [ 31 | -336, 32 | 0 33 | ], 34 | "id": "d1eeb6ec-04b9-4874-b2fc-83bacb38eee4", 35 | "name": "Get Data From Mitra10.com" 36 | }, 37 | { 38 | "parameters": { 39 | "operation": "extractHtmlContent", 40 | "extractionValues": { 41 | "values": [ 42 | { 43 | "key": "price", 44 | "cssSelector": "#maincontent > div.jss62.row > div.jss65.col-xs-12.col-lg-5 > div:nth-child(3) > div.jss71 > div > span" 45 | } 46 | ] 47 | }, 48 | "options": {} 49 | }, 50 | "type": "n8n-nodes-base.html", 51 | "typeVersion": 1.2, 52 | "position": [ 53 | -112, 54 | 0 55 | ], 56 | "id": "6c377b25-0d09-4bea-a410-909bda4a027f", 57 | "name": "Extract Price Selector" 58 | }, 59 | { 60 | "parameters": { 61 | "assignments": { 62 | "assignments": [ 63 | { 64 | "id": "646b1480-2300-4735-aca2-fa2d3af6a897", 65 | "name": "price", 66 | "value": "={{ $json.price.replaceAll('IDR', '').replaceAll(',','').trim() }}", 67 | "type": "number" 68 | } 69 | ] 70 | }, 71 | "options": {} 72 | }, 73 | "type": "n8n-nodes-base.set", 74 | "typeVersion": 3.4, 75 | "position": [ 76 | 96, 77 | 0 78 | ], 79 | "id": "1886700e-e882-4199-af54-c137db63300a", 80 | "name": "Format Price Data" 81 | }, 82 | { 83 | "parameters": { 84 | "conditions": { 85 | "options": { 86 | "caseSensitive": true, 87 | "leftValue": "", 88 | "typeValidation": "strict", 89 | "version": 2 90 | }, 91 | "conditions": [ 92 | { 93 | "id": "a64900f8-d58c-48cb-9cf4-c41b241f2f69", 94 | "leftValue": "={{ $json.price }}", 95 | "rightValue": 620000, 96 | "operator": { 97 | "type": "number", 98 | "operation": "lt" 99 | } 100 | } 101 | ], 102 | "combinator": "and" 103 | }, 104 | "options": {} 105 | }, 106 | "type": "n8n-nodes-base.if", 107 | "typeVersion": 2.2, 108 | "position": [ 109 | 304, 110 | 0 111 | ], 112 | "id": "a03e0d41-0187-4b4c-b897-8deaf0bf967e", 113 | "name": "If Price < 620.000" 114 | }, 115 | { 116 | "parameters": { 117 | "chatId": "", 118 | "text": "[DURAWOOD DISKOOON!!!] - *ALERTA ALERTA!* BURUAN CHECKOUT", 119 | "additionalFields": { 120 | "appendAttribution": false 121 | } 122 | }, 123 | "type": "n8n-nodes-base.telegram", 124 | "typeVersion": 1.2, 125 | "position": [ 126 | 576, 127 | 0 128 | ], 129 | "id": "73cdebf3-6d1f-4f3e-add6-8b4031c0fd09", 130 | "name": "Alerta Alerta ~", 131 | "webhookId": "7d2aa238-c42e-4fe7-ab13-f05344ab811e", 132 | "credentials": { 133 | "telegramApi": { 134 | "id": "xTOi4bpooYFQamoA", 135 | "name": "Telegram" 136 | } 137 | } 138 | } 139 | ], 140 | "pinData": {}, 141 | "connections": { 142 | "Schedule Every Hour": { 143 | "main": [ 144 | [ 145 | { 146 | "node": "Get Data From Mitra10.com", 147 | "type": "main", 148 | "index": 0 149 | } 150 | ] 151 | ] 152 | }, 153 | "Get Data From Mitra10.com": { 154 | "main": [ 155 | [ 156 | { 157 | "node": "Extract Price Selector", 158 | "type": "main", 159 | "index": 0 160 | } 161 | ] 162 | ] 163 | }, 164 | "Extract Price Selector": { 165 | "main": [ 166 | [ 167 | { 168 | "node": "Format Price Data", 169 | "type": "main", 170 | "index": 0 171 | } 172 | ] 173 | ] 174 | }, 175 | "Format Price Data": { 176 | "main": [ 177 | [ 178 | { 179 | "node": "If Price < 620.000", 180 | "type": "main", 181 | "index": 0 182 | } 183 | ] 184 | ] 185 | }, 186 | "If Price < 620.000": { 187 | "main": [ 188 | [ 189 | { 190 | "node": "Alerta Alerta ~", 191 | "type": "main", 192 | "index": 0 193 | } 194 | ] 195 | ] 196 | } 197 | }, 198 | "active": true, 199 | "settings": { 200 | "executionOrder": "v1" 201 | }, 202 | "versionId": "29e2cfd0-d2cc-466f-831d-e0127c434937", 203 | "meta": { 204 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 205 | }, 206 | "id": "FLctZ4v3jAHR934X", 207 | "tags": [] 208 | } 209 | -------------------------------------------------------------------------------- /chatwoot-ai-agent.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatwoot AI", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "httpMethod": "POST", 7 | "path": "d4597311-e7b4-4791-a45d-290bfa0d8ff9", 8 | "options": {} 9 | }, 10 | "type": "n8n-nodes-base.webhook", 11 | "typeVersion": 2, 12 | "position": [ 13 | -260, 14 | 0 15 | ], 16 | "id": "50bc4e90-b105-4494-a58f-109fd417db19", 17 | "name": "Webhook", 18 | "webhookId": "d4597311-e7b4-4791-a45d-290bfa0d8ff9" 19 | }, 20 | { 21 | "parameters": { 22 | "promptType": "define", 23 | "text": "={{ $json.body.content }}", 24 | "options": {} 25 | }, 26 | "type": "@n8n/n8n-nodes-langchain.agent", 27 | "typeVersion": 2, 28 | "position": [ 29 | 280, 30 | 0 31 | ], 32 | "id": "b92da48b-6358-4891-9184-7a00c54f53dc", 33 | "name": "AI Agent" 34 | }, 35 | { 36 | "parameters": { 37 | "model": { 38 | "__rl": true, 39 | "value": "gpt-4.1", 40 | "mode": "list", 41 | "cachedResultName": "gpt-4.1" 42 | }, 43 | "options": {} 44 | }, 45 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 46 | "typeVersion": 1.2, 47 | "position": [ 48 | 120, 49 | 240 50 | ], 51 | "id": "f06501c8-b118-4c11-a2e3-a10585484ed0", 52 | "name": "OpenAI Chat Model", 53 | "credentials": { 54 | "openAiApi": { 55 | "id": "y8sLJ2LzZL2c7SGi", 56 | "name": "OpenAI Webinar" 57 | } 58 | } 59 | }, 60 | { 61 | "parameters": { 62 | "sessionIdType": "customKey", 63 | "sessionKey": "={{ $json.body.conversation.contact_inbox.source_id }}" 64 | }, 65 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 66 | "typeVersion": 1.3, 67 | "position": [ 68 | 300, 69 | 240 70 | ], 71 | "id": "9e97a0ee-dcb8-480b-9c70-fc8a6c3bc6ee", 72 | "name": "Simple Memory" 73 | }, 74 | { 75 | "parameters": { 76 | "resource": "Messages", 77 | "operation": "Create A New Message In A Conversation", 78 | "account_id": "={{ $('Webhook').item.json.body.account.id }}", 79 | "conversation_id": "={{ $('Webhook').item.json.body.conversation.id }}", 80 | "content": "={{ $json.output }}", 81 | "private": false, 82 | "content_type": "=text", 83 | "template_params": "{}", 84 | "requestOptions": {} 85 | }, 86 | "type": "@devlikeapro/n8n-nodes-chatwoot.chatWoot", 87 | "typeVersion": 1, 88 | "position": [ 89 | 640, 90 | 0 91 | ], 92 | "id": "0bf2db4f-5223-4d77-a83d-5706108458e3", 93 | "name": "Create New Message", 94 | "credentials": { 95 | "chatwootApi": { 96 | "id": "FctKQzZqmtZp65LF", 97 | "name": "ChatWoot - Application" 98 | } 99 | } 100 | }, 101 | { 102 | "parameters": { 103 | "conditions": { 104 | "options": { 105 | "caseSensitive": true, 106 | "leftValue": "", 107 | "typeValidation": "strict", 108 | "version": 2 109 | }, 110 | "conditions": [ 111 | { 112 | "id": "e95389d1-3bee-48d9-9efb-8222b4b6b206", 113 | "leftValue": "={{ $json.body.message_type }}", 114 | "rightValue": "incoming", 115 | "operator": { 116 | "type": "string", 117 | "operation": "equals", 118 | "name": "filter.operator.equals" 119 | } 120 | } 121 | ], 122 | "combinator": "and" 123 | }, 124 | "options": {} 125 | }, 126 | "type": "n8n-nodes-base.if", 127 | "typeVersion": 2.2, 128 | "position": [ 129 | -40, 130 | 0 131 | ], 132 | "id": "9ba8bbc0-7582-411b-9b82-8c1ca8af295a", 133 | "name": "If Incoming Message" 134 | } 135 | ], 136 | "pinData": {}, 137 | "connections": { 138 | "Webhook": { 139 | "main": [ 140 | [ 141 | { 142 | "node": "If Incoming Message", 143 | "type": "main", 144 | "index": 0 145 | } 146 | ] 147 | ] 148 | }, 149 | "OpenAI Chat Model": { 150 | "ai_languageModel": [ 151 | [ 152 | { 153 | "node": "AI Agent", 154 | "type": "ai_languageModel", 155 | "index": 0 156 | } 157 | ] 158 | ] 159 | }, 160 | "Simple Memory": { 161 | "ai_memory": [ 162 | [ 163 | { 164 | "node": "AI Agent", 165 | "type": "ai_memory", 166 | "index": 0 167 | } 168 | ] 169 | ] 170 | }, 171 | "AI Agent": { 172 | "main": [ 173 | [ 174 | { 175 | "node": "Create New Message", 176 | "type": "main", 177 | "index": 0 178 | } 179 | ] 180 | ] 181 | }, 182 | "If Incoming Message": { 183 | "main": [ 184 | [ 185 | { 186 | "node": "AI Agent", 187 | "type": "main", 188 | "index": 0 189 | } 190 | ] 191 | ] 192 | } 193 | }, 194 | "active": true, 195 | "settings": { 196 | "executionOrder": "v1" 197 | }, 198 | "versionId": "82466eec-b23c-4d07-a12a-3ba559cae192", 199 | "meta": { 200 | "templateCredsSetupCompleted": true, 201 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 202 | }, 203 | "id": "sllw12I6rsuvJSpp", 204 | "tags": [] 205 | } -------------------------------------------------------------------------------- /whatsapp-ai-google-calendar.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Joko's Personal AI Assistant", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "updates": [ 7 | "messages" 8 | ], 9 | "options": {} 10 | }, 11 | "type": "n8n-nodes-base.whatsAppTrigger", 12 | "typeVersion": 1, 13 | "position": [ 14 | 0, 15 | 0 16 | ], 17 | "id": "1e593e7f-9b30-451a-bf1b-4eeb963ac83e", 18 | "name": "WhatsApp Trigger", 19 | "webhookId": "7c9338c1-e701-4d43-92c7-d39eafdf8554", 20 | "credentials": { 21 | "whatsAppTriggerApi": { 22 | "id": "rz0qzNHxktacYbgn", 23 | "name": "WhatsApp OAuth account - Asisten Finansial AI" 24 | } 25 | } 26 | }, 27 | { 28 | "parameters": { 29 | "promptType": "define", 30 | "text": "={{ $json.messages[0].text.body }}", 31 | "options": { 32 | "systemMessage": "=Sekarang adalah tanggal {{ $now.format('yyyy-MM-dd') }} jam {{ $now.format('HH:mm:ss') }}.\n\nKamu adalah seorang personal assistant yang sangat hebat dari seseorang paling sibuk sedunia bernama Joko, jadi kamu harus mengatur dan memberikan informasi terkait jadwal Joko dengan sangat baik!\n\nKamu bertugas untuk mengecek dan membuat jadwal di Google Calendar Joko menggunakan tool \"GetEventsTool\" untuk mendapatkan seluruh agenda atau jadwal dalam periode waktu tertentu dan tool \"CreateEventTool\" untuk membuat event atau agenda sesuai dengan permintaannya.\n\n### PENTING ###\n- Untuk membuat event, kamu perlu data waktu mulai event, waktu selesai event dan keterangan event, kalau kamu belum mendapatkan ketiga itu, coba tanya dan pastikan kepada Joko terkait eventnya,\n- Sebelum membuat event nya, kamu konfirmasi lagi kepada Joko apakah data yang kamu kumpulkan sudah sesuai, jika sudah mendapat konfirmasi, baru buat event menggunakan tool \"CreateEventTool\"\n- Jangan terlalu kaku dalam membalas pesan atau meminta data, jangan terlihat seperti kamu adalah seorang robot AI, kamu harus terlihat semanusia mungkin!" 33 | } 34 | }, 35 | "type": "@n8n/n8n-nodes-langchain.agent", 36 | "typeVersion": 1.9, 37 | "position": [ 38 | 220, 39 | 0 40 | ], 41 | "id": "01400a8c-eb06-4f3e-8110-45e1871dec27", 42 | "name": "AI Agent" 43 | }, 44 | { 45 | "parameters": { 46 | "model": { 47 | "__rl": true, 48 | "value": "gpt-4.1", 49 | "mode": "list", 50 | "cachedResultName": "gpt-4.1" 51 | }, 52 | "options": {} 53 | }, 54 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 55 | "typeVersion": 1.2, 56 | "position": [ 57 | 60, 58 | 260 59 | ], 60 | "id": "13d7f5ae-0e0e-47b9-ae5f-90d9f2996726", 61 | "name": "OpenAI Chat Model", 62 | "credentials": { 63 | "openAiApi": { 64 | "id": "hv8gIsU1smdB2KAz", 65 | "name": "OpenAi account - Aji Prakoso" 66 | } 67 | } 68 | }, 69 | { 70 | "parameters": { 71 | "sessionIdType": "customKey", 72 | "sessionKey": "={{ $json.contacts[0].wa_id }}AAC" 73 | }, 74 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 75 | "typeVersion": 1.3, 76 | "position": [ 77 | 220, 78 | 260 79 | ], 80 | "id": "7001675d-f3dc-4882-977c-fdfd54b6d176", 81 | "name": "Simple Memory" 82 | }, 83 | { 84 | "parameters": { 85 | "operation": "send", 86 | "phoneNumberId": "612930151903843", 87 | "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}", 88 | "textBody": "={{ $json.output }}", 89 | "additionalFields": {} 90 | }, 91 | "type": "n8n-nodes-base.whatsApp", 92 | "typeVersion": 1, 93 | "position": [ 94 | 580, 95 | 0 96 | ], 97 | "id": "5b5d4d11-8eb8-49b3-b46d-cb453051f949", 98 | "name": "WhatsApp Business Cloud", 99 | "webhookId": "5606130c-a587-45f1-aec8-d226d29dfa9c", 100 | "credentials": { 101 | "whatsAppApi": { 102 | "id": "zdxgeFffPkxImDJW", 103 | "name": "Whatsapp Account - Asisten Finansial" 104 | } 105 | } 106 | }, 107 | { 108 | "parameters": { 109 | "operation": "getAll", 110 | "calendar": { 111 | "__rl": true, 112 | "value": "", 113 | "mode": "list", 114 | "cachedResultName": "" 115 | }, 116 | "returnAll": true, 117 | "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}", 118 | "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}", 119 | "options": {} 120 | }, 121 | "type": "n8n-nodes-base.googleCalendarTool", 122 | "typeVersion": 1.3, 123 | "position": [ 124 | 500, 125 | 240 126 | ], 127 | "id": "c3885b8d-0baf-4455-9efc-68f3dbc766db", 128 | "name": "GetEventsTool", 129 | "credentials": { 130 | "googleCalendarOAuth2Api": { 131 | "id": "Y1UTejCsKyLeQobX", 132 | "name": "Google Calendar account" 133 | } 134 | } 135 | }, 136 | { 137 | "parameters": { 138 | "calendar": { 139 | "__rl": true, 140 | "value": "", 141 | "mode": "list", 142 | "cachedResultName": "" 143 | }, 144 | "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}", 145 | "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}", 146 | "additionalFields": { 147 | "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}" 148 | } 149 | }, 150 | "type": "n8n-nodes-base.googleCalendarTool", 151 | "typeVersion": 1.3, 152 | "position": [ 153 | 640, 154 | 240 155 | ], 156 | "id": "ba3248ce-7b70-4f9b-874f-83379295c48e", 157 | "name": "CreateEventTool", 158 | "credentials": { 159 | "googleCalendarOAuth2Api": { 160 | "id": "Y1UTejCsKyLeQobX", 161 | "name": "Google Calendar account" 162 | } 163 | } 164 | } 165 | ], 166 | "pinData": {}, 167 | "connections": { 168 | "WhatsApp Trigger": { 169 | "main": [ 170 | [ 171 | { 172 | "node": "AI Agent", 173 | "type": "main", 174 | "index": 0 175 | } 176 | ] 177 | ] 178 | }, 179 | "OpenAI Chat Model": { 180 | "ai_languageModel": [ 181 | [ 182 | { 183 | "node": "AI Agent", 184 | "type": "ai_languageModel", 185 | "index": 0 186 | } 187 | ] 188 | ] 189 | }, 190 | "Simple Memory": { 191 | "ai_memory": [ 192 | [ 193 | { 194 | "node": "AI Agent", 195 | "type": "ai_memory", 196 | "index": 0 197 | } 198 | ] 199 | ] 200 | }, 201 | "AI Agent": { 202 | "main": [ 203 | [ 204 | { 205 | "node": "WhatsApp Business Cloud", 206 | "type": "main", 207 | "index": 0 208 | } 209 | ] 210 | ] 211 | }, 212 | "GetEventsTool": { 213 | "ai_tool": [ 214 | [ 215 | { 216 | "node": "AI Agent", 217 | "type": "ai_tool", 218 | "index": 0 219 | } 220 | ] 221 | ] 222 | }, 223 | "CreateEventTool": { 224 | "ai_tool": [ 225 | [ 226 | { 227 | "node": "AI Agent", 228 | "type": "ai_tool", 229 | "index": 0 230 | } 231 | ] 232 | ] 233 | } 234 | }, 235 | "active": false, 236 | "settings": { 237 | "executionOrder": "v1" 238 | }, 239 | "versionId": "2c7bcdcc-9a8a-4905-88cf-d09bf33a261f", 240 | "meta": { 241 | "templateCredsSetupCompleted": true, 242 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 243 | }, 244 | "id": "bnnrpOQg4f9Xl1WN", 245 | "tags": [] 246 | } -------------------------------------------------------------------------------- /ai-news-whatsapp-channel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AI News Indonesia", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "promptType": "define", 7 | "text": "=Cari berita AI hari ini ({{ $now.format('yyyy-MM-dd') }})", 8 | "options": { 9 | "systemMessage": "=Kamu adalah seorang wartawan yang sangat ahli dalam mencari informasi dari berbagai sumber situs berita.\n\n\n\nKamu bertugas untuk mencari berita terbaru tentang AI dari tool-tool yang sudah disediakan : \n- RSS Feed \"TheDecoder\"\n- RSS Feed \"TechCrunch\" \n- Google Search \"GoogleSearch\"\nPENTING : PASTIKAN KAMU MENGGUNAKAN SEMUA TOOL TERSEBUT!\n\nKamu harus bisa mengkombinasikan semua berita dari tools-tools tersebut.\n\nKamu harus memilih maksimal 7 berita yang paling menarik dari semua sumber yang kamu miliki, berita-beritanya harus yang masih aktual (1 hari terakhir dari hari ini : {{ $now.format('yyyy-MM-dd') }})\n\nSetelah kamu memilih maksimal 7 berita, gunakan tool \"HttpTool\" untuk mendapatkan isi berita supaya kamu dapat merangkum dengan lebih baik.\n\nKamu HARUS menggunakan tool \"Think\" untuk merencanakan dan berfikir sebelum bertindak atau memberikan respon.\n\nJika kamu sudah memiliki informasi cukup, respon dengan rangkuman berita AI yang sudah kamu kumpulkan dalam bahasa indonesia yang singkat, mudah dimengerti, namun tetap mempertahankan konteks beritanya.\n\nCantumkan juga link per berita nya ya.\n\n## PENTING ##\n- Pilih berita yang masih baru (jangan berikan berita yang lebih lama dari 1 hari lalu) berarti berita harus diterbitkan setelah tanggal {{$now.minus(1, 'days').format('dd MMMM yyyy') }},\n- Usahakan campur berita dari beberapa feed yang kamu terima, jangan fokus dengan 1 feed saja\n- Berita akan disebarkan via Channel Telegram dan WhatsApp, jadi jangan ada imbuhan atau pertanyaan apapun.\n- Jangan memberikan link dalam format \"([Selengkapnya](https://the-decoder.com/anthropic-triples-revenue-to-3-billion-as-corporate-demand-for-generative-ai-surges/))\" atau \"[Link](https://the-decoder.com/anthropic-triples-revenue-to-3-billion-as-corporate-demand-for-generative-ai-surges/)\" karena tidak akan terbaca saat dikirimkan via WhatsApp, langsung kirim linknya saja sebagai teks biasa, tidak usah di parse,\n- Antar berita, berikan satu baris kosong supaya lebih enak bacanya" 10 | } 11 | }, 12 | "type": "@n8n/n8n-nodes-langchain.agent", 13 | "typeVersion": 1.9, 14 | "position": [ 15 | 360, 16 | 0 17 | ], 18 | "id": "55474565-7c73-42b9-b9fc-3b5e7cd47703", 19 | "name": "AI Agent" 20 | }, 21 | { 22 | "parameters": { 23 | "url": "https://the-decoder.com/feed/", 24 | "options": {} 25 | }, 26 | "type": "n8n-nodes-base.rssFeedReadTool", 27 | "typeVersion": 1.1, 28 | "position": [ 29 | 640, 30 | 240 31 | ], 32 | "id": "92380dd6-29be-42ea-97bb-beb8d4da0c4c", 33 | "name": "TheDecoder" 34 | }, 35 | { 36 | "parameters": { 37 | "url": "https://techcrunch.com/tag/artificial-intelligence/feed/", 38 | "options": {} 39 | }, 40 | "type": "n8n-nodes-base.rssFeedReadTool", 41 | "typeVersion": 1.1, 42 | "position": [ 43 | 780, 44 | 240 45 | ], 46 | "id": "3a090115-2ace-43a9-b251-0b691b075b4d", 47 | "name": "TechCrunch" 48 | }, 49 | { 50 | "parameters": { 51 | "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}", 52 | "options": {} 53 | }, 54 | "type": "n8n-nodes-base.httpRequestTool", 55 | "typeVersion": 4.2, 56 | "position": [ 57 | 900, 58 | 240 59 | ], 60 | "id": "c6634952-11e9-43ec-9f77-dfd7c5f868e6", 61 | "name": "HttpTool" 62 | }, 63 | { 64 | "parameters": {}, 65 | "type": "@n8n/n8n-nodes-langchain.toolThink", 66 | "typeVersion": 1, 67 | "position": [ 68 | 1020, 69 | 240 70 | ], 71 | "id": "b3af05ba-412c-4cbc-88c6-98779bf003ef", 72 | "name": "ThinkTool" 73 | }, 74 | { 75 | "parameters": { 76 | "rule": { 77 | "interval": [ 78 | { 79 | "field": "cronExpression", 80 | "expression": "14 8 * * *" 81 | } 82 | ] 83 | } 84 | }, 85 | "type": "n8n-nodes-base.scheduleTrigger", 86 | "typeVersion": 1.2, 87 | "position": [ 88 | 40, 89 | 0 90 | ], 91 | "id": "8400f341-2d3c-451b-810e-c764bf151cc4", 92 | "name": "Schedule Trigger" 93 | }, 94 | { 95 | "parameters": { 96 | "resource": "Chatting", 97 | "operation": "Send Text", 98 | "session": "=WWW", 99 | "chatId": "=120363400304673293@newsletter", 100 | "reply_to": "=", 101 | "text": "={{ $json.output }}", 102 | "linkPreview": false, 103 | "requestOptions": {} 104 | }, 105 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 106 | "typeVersion": 202502, 107 | "position": [ 108 | 940, 109 | -20 110 | ], 111 | "id": "b850d157-848f-486e-9956-f0b4d731957d", 112 | "name": "Broadcast to Channel", 113 | "credentials": { 114 | "wahaApi": { 115 | "id": "WFk1esFjYZkMPMlY", 116 | "name": "WAHA Webinar 3" 117 | } 118 | } 119 | }, 120 | { 121 | "parameters": { 122 | "toolDescription": "Search AI news on Google", 123 | "url": "https://serpapi.com/search.json?engine=google&q=ai+news+today&google_domain=google.com&gl=us&hl=en&tbs=qdr%3Ad&tbm=nws&api_key=", 124 | "options": {} 125 | }, 126 | "type": "n8n-nodes-base.httpRequestTool", 127 | "typeVersion": 4.2, 128 | "position": [ 129 | 1160, 130 | 240 131 | ], 132 | "id": "b4030356-95dd-489e-b1e9-6e28bbdb0af4", 133 | "name": "GoogleSearch" 134 | }, 135 | { 136 | "parameters": { 137 | "model": { 138 | "__rl": true, 139 | "mode": "list", 140 | "value": "gpt-4.1-mini" 141 | }, 142 | "options": {} 143 | }, 144 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 145 | "typeVersion": 1.2, 146 | "position": [ 147 | 280, 148 | 260 149 | ], 150 | "id": "7d6a1d18-7d8a-48fa-b7d2-d8fed5d17dea", 151 | "name": "OpenAI Chat Model", 152 | "credentials": { 153 | "openAiApi": { 154 | "id": "kBeobd8DEhCBrUWy", 155 | "name": "Webinar 3" 156 | } 157 | } 158 | } 159 | ], 160 | "pinData": {}, 161 | "connections": { 162 | "AI Agent": { 163 | "main": [ 164 | [ 165 | { 166 | "node": "Broadcast to Channel", 167 | "type": "main", 168 | "index": 0 169 | } 170 | ] 171 | ] 172 | }, 173 | "TheDecoder": { 174 | "ai_tool": [ 175 | [ 176 | { 177 | "node": "AI Agent", 178 | "type": "ai_tool", 179 | "index": 0 180 | } 181 | ] 182 | ] 183 | }, 184 | "TechCrunch": { 185 | "ai_tool": [ 186 | [ 187 | { 188 | "node": "AI Agent", 189 | "type": "ai_tool", 190 | "index": 0 191 | } 192 | ] 193 | ] 194 | }, 195 | "HttpTool": { 196 | "ai_tool": [ 197 | [ 198 | { 199 | "node": "AI Agent", 200 | "type": "ai_tool", 201 | "index": 0 202 | } 203 | ] 204 | ] 205 | }, 206 | "ThinkTool": { 207 | "ai_tool": [ 208 | [ 209 | { 210 | "node": "AI Agent", 211 | "type": "ai_tool", 212 | "index": 0 213 | } 214 | ] 215 | ] 216 | }, 217 | "Schedule Trigger": { 218 | "main": [ 219 | [ 220 | { 221 | "node": "AI Agent", 222 | "type": "main", 223 | "index": 0 224 | } 225 | ] 226 | ] 227 | }, 228 | "Broadcast to Channel": { 229 | "main": [ 230 | [] 231 | ] 232 | }, 233 | "GoogleSearch": { 234 | "ai_tool": [ 235 | [ 236 | { 237 | "node": "AI Agent", 238 | "type": "ai_tool", 239 | "index": 0 240 | } 241 | ] 242 | ] 243 | }, 244 | "OpenAI Chat Model": { 245 | "ai_languageModel": [ 246 | [ 247 | { 248 | "node": "AI Agent", 249 | "type": "ai_languageModel", 250 | "index": 0 251 | } 252 | ] 253 | ] 254 | } 255 | }, 256 | "active": true, 257 | "settings": { 258 | "executionOrder": "v1" 259 | }, 260 | "versionId": "4d9d8085-f2c5-4174-992f-4b17d6f9f9ce", 261 | "meta": { 262 | "templateCredsSetupCompleted": true, 263 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 264 | }, 265 | "id": "xoBW2VAQyNjEdlAb", 266 | "tags": [] 267 | } -------------------------------------------------------------------------------- /voice-ai-agent-maia-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Voice AI Agent x MAIA Router", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "httpMethod": "POST", 7 | "path": "voice-agent", 8 | "responseMode": "responseNode", 9 | "options": {} 10 | }, 11 | "type": "n8n-nodes-base.webhook", 12 | "typeVersion": 2.1, 13 | "position": [ 14 | -528, 15 | -16 16 | ], 17 | "id": "28f5bc31-9115-486e-b413-82a68e46ae5a", 18 | "name": "Webhook", 19 | "webhookId": "abdf0324-2716-497b-a380-2870c91531f5" 20 | }, 21 | { 22 | "parameters": { 23 | "resource": "audio", 24 | "operation": "transcribe", 25 | "binaryPropertyName": "audio", 26 | "options": { 27 | "language": "id", 28 | "temperature": "={{ Math.random() * (0.5 - 0.01) + 0.01 }}" 29 | } 30 | }, 31 | "type": "@n8n/n8n-nodes-langchain.openAi", 32 | "typeVersion": 2, 33 | "position": [ 34 | -240, 35 | -16 36 | ], 37 | "id": "be582151-f567-4d1f-bf77-4d609d55f17b", 38 | "name": "Transcribe Audio", 39 | "credentials": { 40 | "openAiApi": { 41 | "id": "M59vNQgcWNggRb0D", 42 | "name": "MaiaRouter - Audio AI" 43 | } 44 | } 45 | }, 46 | { 47 | "parameters": { 48 | "text": "={{ $json.text }}", 49 | "guardrails": { 50 | "jailbreak": { 51 | "value": { 52 | "threshold": 0.7 53 | } 54 | } 55 | } 56 | }, 57 | "type": "@n8n/n8n-nodes-langchain.guardrails", 58 | "typeVersion": 1, 59 | "position": [ 60 | 0, 61 | -16 62 | ], 63 | "id": "9f470aa2-3a80-4075-b4a3-05075f0775bf", 64 | "name": "Guardrails" 65 | }, 66 | { 67 | "parameters": { 68 | "model": { 69 | "__rl": true, 70 | "value": "openai/gpt-4.1-mini", 71 | "mode": "list", 72 | "cachedResultName": "openai/gpt-4.1-mini" 73 | }, 74 | "builtInTools": {}, 75 | "options": {} 76 | }, 77 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 78 | "typeVersion": 1.3, 79 | "position": [ 80 | 256, 81 | 240 82 | ], 83 | "id": "20eb6517-8f64-4e9b-89d3-a72d971fa0e9", 84 | "name": "OpenAI Chat Model", 85 | "credentials": { 86 | "openAiApi": { 87 | "id": "M59vNQgcWNggRb0D", 88 | "name": "MaiaRouter - Audio AI" 89 | } 90 | } 91 | }, 92 | { 93 | "parameters": { 94 | "promptType": "guardrails", 95 | "options": { 96 | "systemMessage": "You are a helpful assistant" 97 | } 98 | }, 99 | "type": "@n8n/n8n-nodes-langchain.agent", 100 | "typeVersion": 3, 101 | "position": [ 102 | 416, 103 | -32 104 | ], 105 | "id": "ba1a7805-7cdb-4882-b092-f793e5f47904", 106 | "name": "AI Agent" 107 | }, 108 | { 109 | "parameters": { 110 | "sessionIdType": "customKey", 111 | "sessionKey": "={{ $('Webhook').item.json.body.session }}" 112 | }, 113 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 114 | "typeVersion": 1.3, 115 | "position": [ 116 | 512, 117 | 208 118 | ], 119 | "id": "cdfcfb46-cbcf-4671-b43b-831ef912a60d", 120 | "name": "Simple Memory" 121 | }, 122 | { 123 | "parameters": { 124 | "resource": "audio", 125 | "model": "=openai/gpt-4o-mini-tts", 126 | "input": "={{ $json.output }}", 127 | "options": { 128 | "speed": 1.4 129 | }, 130 | "images": { 131 | "values": [ 132 | {} 133 | ] 134 | } 135 | }, 136 | "type": "@n8n/n8n-nodes-langchain.openAi", 137 | "typeVersion": 2, 138 | "position": [ 139 | 768, 140 | -32 141 | ], 142 | "id": "fb3bb8b2-b194-410a-bcc4-b39d9ce9bf1c", 143 | "name": "Generate audio", 144 | "credentials": { 145 | "openAiApi": { 146 | "id": "M59vNQgcWNggRb0D", 147 | "name": "MaiaRouter - Audio AI" 148 | } 149 | } 150 | }, 151 | { 152 | "parameters": { 153 | "respondWith": "binary", 154 | "responseDataSource": "set", 155 | "options": {} 156 | }, 157 | "type": "n8n-nodes-base.respondToWebhook", 158 | "typeVersion": 1.4, 159 | "position": [ 160 | 976, 161 | -32 162 | ], 163 | "id": "4e1be779-ff7e-4b6e-93f4-760290b1c40d", 164 | "name": "Respond to Webhook" 165 | } 166 | ], 167 | "pinData": { 168 | "Webhook": [ 169 | { 170 | "json": { 171 | "headers": { 172 | "host": "n8n.pesenin.my.id", 173 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36", 174 | "content-length": "45046", 175 | "accept": "*/*", 176 | "accept-encoding": "gzip, br", 177 | "accept-language": "en-US,en;q=0.9", 178 | "cdn-loop": "cloudflare; loops=1", 179 | "cf-connecting-ip": "2001:448a:2040:3612:706d:6b17:9bcf:49aa", 180 | "cf-ipcountry": "ID", 181 | "cf-ray": "9a2d241b191f797b-SIN", 182 | "cf-visitor": "{\"scheme\":\"https\"}", 183 | "cf-warp-tag-id": "28f20de4-c589-4fda-b60c-8a54efee0276", 184 | "connection": "keep-alive", 185 | "content-type": "multipart/form-data; boundary=----WebKitFormBoundaryXMNZGZPedh9Vmp6a", 186 | "origin": "https://7e974b0a-482e-4543-8d3d-3ba806634e76.lovableproject.com", 187 | "priority": "u=1, i", 188 | "referer": "https://7e974b0a-482e-4543-8d3d-3ba806634e76.lovableproject.com/", 189 | "sec-ch-ua": "\"Chromium\";v=\"142\", \"Google Chrome\";v=\"142\", \"Not_A Brand\";v=\"99\"", 190 | "sec-ch-ua-mobile": "?0", 191 | "sec-ch-ua-platform": "\"Windows\"", 192 | "sec-fetch-dest": "empty", 193 | "sec-fetch-mode": "cors", 194 | "sec-fetch-site": "cross-site", 195 | "x-forwarded-for": "2001:448a:2040:3612:706d:6b17:9bcf:49aa", 196 | "x-forwarded-proto": "https" 197 | }, 198 | "params": {}, 199 | "query": {}, 200 | "body": { 201 | "session": "session_1763861839332_b164sjvsp" 202 | }, 203 | "webhookUrl": "https://n8n.pesenin.my.id/webhook/voice-agent", 204 | "executionMode": "production" 205 | }, 206 | "binary": { 207 | "audio": { 208 | "mimeType": "audio/webm", 209 | "fileType": "audio", 210 | "fileExtension": "weba", 211 | "data": "filesystem-v2", 212 | "fileName": "recording.webm", 213 | "id": "filesystem-v2:workflows/gmh46y2s1yCsEMxr/executions/temp/binary_data/34233224-4efe-4021-8a6e-0f8d28cab304", 214 | "fileSize": "44.7 kB" 215 | } 216 | } 217 | } 218 | ] 219 | }, 220 | "connections": { 221 | "Webhook": { 222 | "main": [ 223 | [ 224 | { 225 | "node": "Transcribe Audio", 226 | "type": "main", 227 | "index": 0 228 | } 229 | ] 230 | ] 231 | }, 232 | "Transcribe Audio": { 233 | "main": [ 234 | [ 235 | { 236 | "node": "Guardrails", 237 | "type": "main", 238 | "index": 0 239 | } 240 | ] 241 | ] 242 | }, 243 | "OpenAI Chat Model": { 244 | "ai_languageModel": [ 245 | [ 246 | { 247 | "node": "AI Agent", 248 | "type": "ai_languageModel", 249 | "index": 0 250 | }, 251 | { 252 | "node": "Guardrails", 253 | "type": "ai_languageModel", 254 | "index": 0 255 | } 256 | ] 257 | ] 258 | }, 259 | "Guardrails": { 260 | "main": [ 261 | [ 262 | { 263 | "node": "AI Agent", 264 | "type": "main", 265 | "index": 0 266 | } 267 | ] 268 | ] 269 | }, 270 | "Simple Memory": { 271 | "ai_memory": [ 272 | [ 273 | { 274 | "node": "AI Agent", 275 | "type": "ai_memory", 276 | "index": 0 277 | } 278 | ] 279 | ] 280 | }, 281 | "AI Agent": { 282 | "main": [ 283 | [ 284 | { 285 | "node": "Generate audio", 286 | "type": "main", 287 | "index": 0 288 | } 289 | ] 290 | ] 291 | }, 292 | "Generate audio": { 293 | "main": [ 294 | [ 295 | { 296 | "node": "Respond to Webhook", 297 | "type": "main", 298 | "index": 0 299 | } 300 | ] 301 | ] 302 | } 303 | }, 304 | "active": true, 305 | "settings": { 306 | "executionOrder": "v1" 307 | }, 308 | "versionId": "652e6126-2598-4d65-807c-b192a42f9760", 309 | "meta": { 310 | "templateCredsSetupCompleted": true, 311 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 312 | }, 313 | "id": "gmh46y2s1yCsEMxr", 314 | "tags": [] 315 | } 316 | -------------------------------------------------------------------------------- /google-sheets-to-data-tables-migration.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Google Sheets to Data Tables Migration", 3 | "nodes": [ 4 | { 5 | "parameters": {}, 6 | "type": "n8n-nodes-base.manualTrigger", 7 | "typeVersion": 1, 8 | "position": [ 9 | -512, 10 | 0 11 | ], 12 | "id": "e9a472a3-359a-4bdf-9b7c-6a9b11cc0192", 13 | "name": "When clicking ‘Execute workflow’" 14 | }, 15 | { 16 | "parameters": { 17 | "documentId": { 18 | "__rl": true, 19 | "value": "", 20 | "mode": "list", 21 | "cachedResultName": "Dummy Product", 22 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d//edit?usp=drivesdk" 23 | }, 24 | "sheetName": { 25 | "__rl": true, 26 | "value": 2092349693, 27 | "mode": "list", 28 | "cachedResultName": "products", 29 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d//edit#gid=2092349693" 30 | }, 31 | "options": {} 32 | }, 33 | "type": "n8n-nodes-base.googleSheets", 34 | "typeVersion": 4.7, 35 | "position": [ 36 | -288, 37 | 0 38 | ], 39 | "id": "801ecbfd-e4c9-452e-b877-4987e2861866", 40 | "name": "Load Data", 41 | "credentials": { 42 | "googleSheetsOAuth2Api": { 43 | "id": "cgLRhzM2dYj1Knm5", 44 | "name": "Google Sheets account" 45 | } 46 | } 47 | }, 48 | { 49 | "parameters": { 50 | "conditions": { 51 | "options": { 52 | "caseSensitive": true, 53 | "leftValue": "", 54 | "typeValidation": "loose", 55 | "version": 2 56 | }, 57 | "conditions": [ 58 | { 59 | "id": "5ebab989-cb49-4a16-90d9-2de56d767122", 60 | "leftValue": "={{ $json.id }}", 61 | "rightValue": "", 62 | "operator": { 63 | "type": "string", 64 | "operation": "exists", 65 | "singleValue": true 66 | } 67 | } 68 | ], 69 | "combinator": "and" 70 | }, 71 | "looseTypeValidation": true, 72 | "options": {} 73 | }, 74 | "type": "n8n-nodes-base.if", 75 | "typeVersion": 2.2, 76 | "position": [ 77 | 464, 78 | 0 79 | ], 80 | "id": "65e911c9-f370-4c90-b3d2-c8b5a3518776", 81 | "name": "If Data Exists", 82 | "alwaysOutputData": false 83 | }, 84 | { 85 | "parameters": { 86 | "dataTableId": { 87 | "__rl": true, 88 | "value": "vEbEXhI8JB4kxuzt", 89 | "mode": "list", 90 | "cachedResultName": "product", 91 | "cachedResultUrl": "/projects/5kFey1Cq96zjpl78/datatables/vEbEXhI8JB4kxuzt" 92 | }, 93 | "columns": { 94 | "mappingMode": "defineBelow", 95 | "value": { 96 | "sheet_row": "={{ $('Loop Over Items').item.json.row_number }}", 97 | "nama": "={{ $('Loop Over Items').item.json['A (Nama Produk)'] }}", 98 | "jenis": "={{ $('Loop Over Items').item.json['B (Jenis)'] }}", 99 | "ukuran": "={{ $('Loop Over Items').item.json['C (Ukuran)'] }}", 100 | "warna": "={{ $('Loop Over Items').item.json['D (Warna)'] }}", 101 | "harga": "={{ $('Loop Over Items').item.json['E (Harga)'] }}", 102 | "stok": "={{ $('Loop Over Items').item.json['F (Stok)'] }}" 103 | }, 104 | "matchingColumns": [], 105 | "schema": [ 106 | { 107 | "id": "sheet_row", 108 | "displayName": "sheet_row", 109 | "required": false, 110 | "defaultMatch": false, 111 | "display": true, 112 | "type": "number", 113 | "readOnly": false, 114 | "removed": false 115 | }, 116 | { 117 | "id": "nama", 118 | "displayName": "nama", 119 | "required": false, 120 | "defaultMatch": false, 121 | "display": true, 122 | "type": "string", 123 | "readOnly": false, 124 | "removed": false 125 | }, 126 | { 127 | "id": "jenis", 128 | "displayName": "jenis", 129 | "required": false, 130 | "defaultMatch": false, 131 | "display": true, 132 | "type": "string", 133 | "readOnly": false, 134 | "removed": false 135 | }, 136 | { 137 | "id": "ukuran", 138 | "displayName": "ukuran", 139 | "required": false, 140 | "defaultMatch": false, 141 | "display": true, 142 | "type": "string", 143 | "readOnly": false, 144 | "removed": false 145 | }, 146 | { 147 | "id": "warna", 148 | "displayName": "warna", 149 | "required": false, 150 | "defaultMatch": false, 151 | "display": true, 152 | "type": "string", 153 | "readOnly": false, 154 | "removed": false 155 | }, 156 | { 157 | "id": "harga", 158 | "displayName": "harga", 159 | "required": false, 160 | "defaultMatch": false, 161 | "display": true, 162 | "type": "number", 163 | "readOnly": false, 164 | "removed": false 165 | }, 166 | { 167 | "id": "stok", 168 | "displayName": "stok", 169 | "required": false, 170 | "defaultMatch": false, 171 | "display": true, 172 | "type": "number", 173 | "readOnly": false, 174 | "removed": false 175 | } 176 | ], 177 | "attemptToConvertTypes": false, 178 | "convertFieldsToString": false 179 | }, 180 | "options": {} 181 | }, 182 | "type": "n8n-nodes-base.dataTable", 183 | "typeVersion": 1, 184 | "position": [ 185 | 768, 186 | 16 187 | ], 188 | "id": "0a626329-2434-492f-9525-122f6d3032e0", 189 | "name": "Insert row" 190 | }, 191 | { 192 | "parameters": { 193 | "operation": "get", 194 | "dataTableId": { 195 | "__rl": true, 196 | "value": "vEbEXhI8JB4kxuzt", 197 | "mode": "list", 198 | "cachedResultName": "product", 199 | "cachedResultUrl": "/projects/5kFey1Cq96zjpl78/datatables/vEbEXhI8JB4kxuzt" 200 | }, 201 | "matchType": "allConditions", 202 | "filters": { 203 | "conditions": [ 204 | { 205 | "keyName": "sheet_row", 206 | "keyValue": "={{ $json.row_number }}" 207 | } 208 | ] 209 | } 210 | }, 211 | "type": "n8n-nodes-base.dataTable", 212 | "typeVersion": 1, 213 | "position": [ 214 | 224, 215 | 0 216 | ], 217 | "id": "5e4183e4-bb3d-4706-b241-0a3af56cd20d", 218 | "name": "Check Existing Data", 219 | "alwaysOutputData": true 220 | }, 221 | { 222 | "parameters": { 223 | "options": {} 224 | }, 225 | "type": "n8n-nodes-base.splitInBatches", 226 | "typeVersion": 3, 227 | "position": [ 228 | -80, 229 | 0 230 | ], 231 | "id": "d48a309a-cfc4-4a04-a5f8-cefb79605f88", 232 | "name": "Loop Over Items" 233 | } 234 | ], 235 | "pinData": {}, 236 | "connections": { 237 | "When clicking ‘Execute workflow’": { 238 | "main": [ 239 | [ 240 | { 241 | "node": "Load Data", 242 | "type": "main", 243 | "index": 0 244 | } 245 | ] 246 | ] 247 | }, 248 | "Load Data": { 249 | "main": [ 250 | [ 251 | { 252 | "node": "Loop Over Items", 253 | "type": "main", 254 | "index": 0 255 | } 256 | ] 257 | ] 258 | }, 259 | "If Data Exists": { 260 | "main": [ 261 | [ 262 | { 263 | "node": "Loop Over Items", 264 | "type": "main", 265 | "index": 0 266 | } 267 | ], 268 | [ 269 | { 270 | "node": "Insert row", 271 | "type": "main", 272 | "index": 0 273 | } 274 | ] 275 | ] 276 | }, 277 | "Check Existing Data": { 278 | "main": [ 279 | [ 280 | { 281 | "node": "If Data Exists", 282 | "type": "main", 283 | "index": 0 284 | } 285 | ] 286 | ] 287 | }, 288 | "Loop Over Items": { 289 | "main": [ 290 | [], 291 | [ 292 | { 293 | "node": "Check Existing Data", 294 | "type": "main", 295 | "index": 0 296 | } 297 | ] 298 | ] 299 | }, 300 | "Insert row": { 301 | "main": [ 302 | [ 303 | { 304 | "node": "Loop Over Items", 305 | "type": "main", 306 | "index": 0 307 | } 308 | ] 309 | ] 310 | } 311 | }, 312 | "active": false, 313 | "settings": { 314 | "executionOrder": "v1" 315 | }, 316 | "versionId": "30afa8a1-39f8-4b6c-a377-a61f5290043e", 317 | "meta": { 318 | "templateCredsSetupCompleted": true, 319 | "instanceId": "da2d061a20f85e542ce3a465c6129145479f757dfdeae5d1d957eacb0fca5601" 320 | }, 321 | "id": "mOh17NyWKG3YgVyz", 322 | "tags": [] 323 | } 324 | -------------------------------------------------------------------------------- /simple-rag.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple RAG", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "formTitle": "Upload RAG PDF", 7 | "formDescription": "Upload RAG PDF", 8 | "formFields": { 9 | "values": [ 10 | { 11 | "fieldLabel": "File", 12 | "fieldType": "file", 13 | "multipleFiles": false, 14 | "acceptFileTypes": ".pdf", 15 | "requiredField": true 16 | } 17 | ] 18 | }, 19 | "options": {} 20 | }, 21 | "type": "n8n-nodes-base.formTrigger", 22 | "typeVersion": 2.2, 23 | "position": [ 24 | 0, 25 | 0 26 | ], 27 | "id": "93cd13c5-12ad-4c9c-aac7-1886a1d24470", 28 | "name": "On form submission", 29 | "webhookId": "cab3dda4-3b49-4f05-a2c1-915ae4c62017" 30 | }, 31 | { 32 | "parameters": { 33 | "mode": "insert", 34 | "pineconeIndex": { 35 | "__rl": true, 36 | "value": "n8n", 37 | "mode": "list", 38 | "cachedResultName": "n8n" 39 | }, 40 | "options": {} 41 | }, 42 | "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", 43 | "typeVersion": 1.3, 44 | "position": [ 45 | 320, 46 | 0 47 | ], 48 | "id": "13fe2ba5-a24d-4198-8509-882eb4c08e1a", 49 | "name": "Pinecone Vector Store", 50 | "credentials": { 51 | "pineconeApi": { 52 | "id": "VP5fhue9NYRkdlCj", 53 | "name": "PineconeApi account" 54 | } 55 | } 56 | }, 57 | { 58 | "parameters": { 59 | "options": { 60 | "dimensions": 1024 61 | } 62 | }, 63 | "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi", 64 | "typeVersion": 1.2, 65 | "position": [ 66 | 920, 67 | 460 68 | ], 69 | "id": "aa3d1481-3da7-4ae1-9857-c64a71e28443", 70 | "name": "Embeddings OpenAI", 71 | "credentials": { 72 | "openAiApi": { 73 | "id": "y8sLJ2LzZL2c7SGi", 74 | "name": "OpenAI Webinar" 75 | } 76 | } 77 | }, 78 | { 79 | "parameters": { 80 | "dataType": "binary", 81 | "textSplittingMode": "custom", 82 | "options": {} 83 | }, 84 | "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader", 85 | "typeVersion": 1.1, 86 | "position": [ 87 | 440, 88 | 220 89 | ], 90 | "id": "17350e15-5b99-493d-acd2-9f44fd661b09", 91 | "name": "Default Data Loader" 92 | }, 93 | { 94 | "parameters": { 95 | "options": {} 96 | }, 97 | "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter", 98 | "typeVersion": 1, 99 | "position": [ 100 | 520, 101 | 440 102 | ], 103 | "id": "8199713d-cad8-4d17-937c-1b3b604b95ea", 104 | "name": "Recursive Character Text Splitter" 105 | }, 106 | { 107 | "parameters": { 108 | "content": "## Insert Data to Pinecone", 109 | "height": 680, 110 | "width": 880 111 | }, 112 | "type": "n8n-nodes-base.stickyNote", 113 | "position": [ 114 | -60, 115 | -80 116 | ], 117 | "typeVersion": 1, 118 | "id": "fcaf5178-4694-4e20-ac62-8da3c1c8279e", 119 | "name": "Sticky Note" 120 | }, 121 | { 122 | "parameters": { 123 | "options": { 124 | "systemMessage": "Hanya jawab berdasarkan data yang ada di tools \"VectorDB\". Kalau data disitu gak ada, jawab saja kamu tidak tahu." 125 | } 126 | }, 127 | "type": "@n8n/n8n-nodes-langchain.agent", 128 | "typeVersion": 2, 129 | "position": [ 130 | 1440, 131 | 80 132 | ], 133 | "id": "e094ded2-c2e9-4139-b6d0-df086f2e2049", 134 | "name": "AI Agent" 135 | }, 136 | { 137 | "parameters": { 138 | "options": {} 139 | }, 140 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 141 | "typeVersion": 1.1, 142 | "position": [ 143 | 1200, 144 | 80 145 | ], 146 | "id": "015d2a82-3c3d-4604-bbbf-7df57dd24269", 147 | "name": "When chat message received", 148 | "webhookId": "c1f8d15b-e096-47f8-922e-a7484ebbc25c" 149 | }, 150 | { 151 | "parameters": { 152 | "model": { 153 | "__rl": true, 154 | "value": "gpt-4.1", 155 | "mode": "list", 156 | "cachedResultName": "gpt-4.1" 157 | }, 158 | "options": {} 159 | }, 160 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 161 | "typeVersion": 1.2, 162 | "position": [ 163 | 1280, 164 | 300 165 | ], 166 | "id": "a1b26946-9a3f-4aa2-a723-f91e196943cf", 167 | "name": "OpenAI Chat Model", 168 | "credentials": { 169 | "openAiApi": { 170 | "id": "y8sLJ2LzZL2c7SGi", 171 | "name": "OpenAI Webinar" 172 | } 173 | } 174 | }, 175 | { 176 | "parameters": {}, 177 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 178 | "typeVersion": 1.3, 179 | "position": [ 180 | 1480, 181 | 300 182 | ], 183 | "id": "6beecd5e-a8fc-4e69-8fbc-a0e0e90c4aa6", 184 | "name": "Simple Memory" 185 | }, 186 | { 187 | "parameters": { 188 | "mode": "retrieve-as-tool", 189 | "toolDescription": "Ambil data dari vector database untuk knowledgebase", 190 | "pineconeIndex": { 191 | "__rl": true, 192 | "value": "n8n", 193 | "mode": "list", 194 | "cachedResultName": "n8n" 195 | }, 196 | "topK": 20, 197 | "useReranker": true, 198 | "options": {} 199 | }, 200 | "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", 201 | "typeVersion": 1.3, 202 | "position": [ 203 | 1640, 204 | 300 205 | ], 206 | "id": "02b1aa4f-a291-4f2c-b6d9-0290d6b563ae", 207 | "name": "VectorDB", 208 | "credentials": { 209 | "pineconeApi": { 210 | "id": "VP5fhue9NYRkdlCj", 211 | "name": "PineconeApi account" 212 | } 213 | } 214 | }, 215 | { 216 | "parameters": { 217 | "content": "## Chat AI Agent", 218 | "height": 680, 219 | "width": 860, 220 | "color": 5 221 | }, 222 | "type": "n8n-nodes-base.stickyNote", 223 | "position": [ 224 | 1100, 225 | -80 226 | ], 227 | "typeVersion": 1, 228 | "id": "bada58fc-73f4-431f-9702-e742a75ce2c3", 229 | "name": "Sticky Note1" 230 | }, 231 | { 232 | "parameters": { 233 | "content": "## Embedding Model", 234 | "height": 300, 235 | "color": 4 236 | }, 237 | "type": "n8n-nodes-base.stickyNote", 238 | "position": [ 239 | 840, 240 | 300 241 | ], 242 | "typeVersion": 1, 243 | "id": "2e572866-dcf7-492f-aebe-35b12bc6b27d", 244 | "name": "Sticky Note2" 245 | }, 246 | { 247 | "parameters": {}, 248 | "type": "@n8n/n8n-nodes-langchain.rerankerCohere", 249 | "typeVersion": 1, 250 | "position": [ 251 | 1740, 252 | 480 253 | ], 254 | "id": "6dcbbf3a-3acd-4170-9f79-c2441da18979", 255 | "name": "Reranker Cohere", 256 | "credentials": { 257 | "cohereApi": { 258 | "id": "yDA2nh2ZZXkR9tcq", 259 | "name": "Cohere API Trial" 260 | } 261 | } 262 | } 263 | ], 264 | "pinData": {}, 265 | "connections": { 266 | "On form submission": { 267 | "main": [ 268 | [ 269 | { 270 | "node": "Pinecone Vector Store", 271 | "type": "main", 272 | "index": 0 273 | } 274 | ] 275 | ] 276 | }, 277 | "Embeddings OpenAI": { 278 | "ai_embedding": [ 279 | [ 280 | { 281 | "node": "Pinecone Vector Store", 282 | "type": "ai_embedding", 283 | "index": 0 284 | }, 285 | { 286 | "node": "VectorDB", 287 | "type": "ai_embedding", 288 | "index": 0 289 | } 290 | ] 291 | ] 292 | }, 293 | "Default Data Loader": { 294 | "ai_document": [ 295 | [ 296 | { 297 | "node": "Pinecone Vector Store", 298 | "type": "ai_document", 299 | "index": 0 300 | } 301 | ] 302 | ] 303 | }, 304 | "Recursive Character Text Splitter": { 305 | "ai_textSplitter": [ 306 | [ 307 | { 308 | "node": "Default Data Loader", 309 | "type": "ai_textSplitter", 310 | "index": 0 311 | } 312 | ] 313 | ] 314 | }, 315 | "Pinecone Vector Store": { 316 | "main": [ 317 | [] 318 | ] 319 | }, 320 | "When chat message received": { 321 | "main": [ 322 | [ 323 | { 324 | "node": "AI Agent", 325 | "type": "main", 326 | "index": 0 327 | } 328 | ] 329 | ] 330 | }, 331 | "OpenAI Chat Model": { 332 | "ai_languageModel": [ 333 | [ 334 | { 335 | "node": "AI Agent", 336 | "type": "ai_languageModel", 337 | "index": 0 338 | } 339 | ] 340 | ] 341 | }, 342 | "Simple Memory": { 343 | "ai_memory": [ 344 | [ 345 | { 346 | "node": "AI Agent", 347 | "type": "ai_memory", 348 | "index": 0 349 | } 350 | ] 351 | ] 352 | }, 353 | "VectorDB": { 354 | "ai_tool": [ 355 | [ 356 | { 357 | "node": "AI Agent", 358 | "type": "ai_tool", 359 | "index": 0 360 | } 361 | ] 362 | ] 363 | }, 364 | "Reranker Cohere": { 365 | "ai_reranker": [ 366 | [ 367 | { 368 | "node": "VectorDB", 369 | "type": "ai_reranker", 370 | "index": 0 371 | } 372 | ] 373 | ] 374 | } 375 | }, 376 | "active": false, 377 | "settings": { 378 | "executionOrder": "v1" 379 | }, 380 | "versionId": "6b1d46bd-ed09-4a25-a95e-fa5a3e2950f7", 381 | "meta": { 382 | "templateCredsSetupCompleted": true, 383 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 384 | }, 385 | "id": "pDhufDfHS9qRgtLf", 386 | "tags": [] 387 | } -------------------------------------------------------------------------------- /biteship-ongkir-chatbot.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Biteship Ongkir Chatbot", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "options": { 7 | "systemMessage": "=Anda adalah \"MIA\" (Maju AI Assistant), asisten layanan pelanggan virtual untuk toko online PT. Maju Kena Mundur Kebelakang. Anda ramah, sopan, dan sangat membantu. Tugas utama Anda adalah melayani pertanyaan pelanggan tentang produk dan memproses pesanan mereka hingga ke tahap pembayaran.\n\n# Aturan Utama & Alur Kerja:\n\nLayanan Produk: Selalu gunakan tool GetProducts untuk menjawab pertanyaan pelanggan mengenai detail produk seperti harga, deskripsi, bahan, ukuran, dan ketersediaan stok. Jangan pernah mengarang informasi produk.\n\nMemulai Proses Checkout: Ketika pelanggan menyatakan ingin membeli satu atau beberapa item, mulailah proses checkout dengan mengikuti langkah-langkah di bawah ini.\n\nLangkah Wajib 1: Dapatkan Lokasi Pelanggan\n\nWAJIB tanyakan kepada pelanggan nama Kecamatan dan Kota/Kabupaten mereka untuk pengecekan ongkos kirim.\n\nContoh pertanyaan: \"Baik, Kak. Untuk melanjutkan pesanan, boleh tolong informasikan nama Kecamatan dan Kota/Kabupaten tujuannya?\"\n\nGunakan tool GetLocation untuk memvalidasi lokasi yang diberikan pelanggan.\n\nLangkah Wajib 2: Konfirmasi Lokasi & Cek Ongkir\n\nSetelah mendapatkan hasil dari GetLocation, konfirmasikan kembali alamat tersebut kepada pelanggan untuk memastikan tidak ada kesalahan.\n\nContoh konfirmasi: \"Saya konfirmasi ya Kak, alamatnya di Kecamatan [Hasil dari GetLocation], sudah benar?\"\n\nJika sudah benar, gunakan tool GetRates untuk mengecek tarif ongkos kirim (ongkir) ke lokasi tersebut. Anda mungkin perlu informasi berat dari data produk (GetProducts).\n\nLangkah Wajib 3: Closing & Informasi Pembayaran\n\nSetelah ongkir didapatkan, hitung total keseluruhan (subtotal belanja + ongkir).\n\nSajikan rincian lengkap kepada pelanggan dengan format yang jelas dan informasikan detail rekening untuk pembayaran.\n\nGunakan format di bawah ini untuk pesan terakhir:\n\nBaik, Kak. Berikut rincian pesanan Anda:\n\nRincian Pesanan:\n\n[Nama Produk 1] - [Jumlah] Pcs - Rp [Harga]\n\n[Nama Produk 2] - [Jumlah] Pcs - Rp [Harga]\n\nDetail Biaya:\n\nSubtotal Belanja: Rp [Total harga semua produk]\n\nOngkos Kirim: Rp [Hasil dari tool GetRates]\n\nTotal Pembayaran: Rp [Subtotal Belanja + Ongkos Kirim]\n\nSilakan lakukan pembayaran ke rekening berikut:\nBank: BCA\nNo. Rekening: 8888111122\nAtas Nama: PT. Maju Kena Mundur Kebelakang\n\nTerima kasih sudah berbelanja!\nBatasan:\n\nTugas Anda berakhir setelah memberikan rincian dan nomor rekening. JANGAN memproses pembayaran atau meminta bukti transfer.\n\nJika tool GetLocation atau GetRates gagal, informasikan kepada pelanggan bahwa sedang ada kendala teknis dalam pengecekan ongkir dan minta mereka untuk mencoba lagi beberapa saat kemudian.\n\nSelalu berinteraksi dalam Bahasa Indonesia yang baik dan sopan.\n\nContoh item list :\n\n[{\n \"name\": \"Shoes\",\n \"description\": \"Black colored size 45\",\n \"value\": 199000,\n \"length\": 30,\n \"width\": 15,\n \"height\": 20,\n \"weight\": 200,\n \"quantity\": 2\n }]\n\n# CATATAN\n- Kalau dari GetRates ada lebih dari 1 pilihan kurir, berikan pilihan dulu ke customer mau pakai yang mana dengan menginformasikan tarifnya" 8 | } 9 | }, 10 | "type": "@n8n/n8n-nodes-langchain.agent", 11 | "typeVersion": 2, 12 | "position": [ 13 | -200, 14 | -140 15 | ], 16 | "id": "e16dbb8b-ae8b-4373-a8cb-abfe3dbe248d", 17 | "name": "AI Agent" 18 | }, 19 | { 20 | "parameters": { 21 | "options": {} 22 | }, 23 | "type": "@n8n/n8n-nodes-langchain.chatTrigger", 24 | "typeVersion": 1.1, 25 | "position": [ 26 | -460, 27 | -140 28 | ], 29 | "id": "968c38c5-787c-46ee-a4f1-da0c7d7999cc", 30 | "name": "When chat message received", 31 | "webhookId": "ba3bacd8-a56d-4448-a950-8abf3ab97993" 32 | }, 33 | { 34 | "parameters": { 35 | "model": { 36 | "__rl": true, 37 | "value": "gpt-4.1", 38 | "mode": "list", 39 | "cachedResultName": "gpt-4.1" 40 | }, 41 | "options": {} 42 | }, 43 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 44 | "typeVersion": 1.2, 45 | "position": [ 46 | -300, 47 | 100 48 | ], 49 | "id": "879fe69d-6283-44ab-a843-ae31dfddf491", 50 | "name": "OpenAI Chat Model", 51 | "credentials": { 52 | "openAiApi": { 53 | "id": "kBeobd8DEhCBrUWy", 54 | "name": "Webinar 3" 55 | } 56 | } 57 | }, 58 | { 59 | "parameters": {}, 60 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 61 | "typeVersion": 1.3, 62 | "position": [ 63 | -120, 64 | 100 65 | ], 66 | "id": "fac8d840-b1c4-42ca-a3d0-cc17959ef695", 67 | "name": "Simple Memory" 68 | }, 69 | { 70 | "parameters": { 71 | "toolDescription": "Use this endpoint to get location ID", 72 | "url": "=https://api.biteship.com/v1/maps/areas?countries=ID&input={{$fromAI('input', 'Location name to search')}}&type=single", 73 | "sendHeaders": true, 74 | "headerParameters": { 75 | "parameters": [ 76 | { 77 | "name": "authorization", 78 | "value": "biteship_live.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoibjhuIiwidXNlcklkIjoiNjg3NDY2ZTNmM2Q2NWEwMDEzNDQ4YWFiIiwiaWF0IjoxNzUyNDU5MDY0fQ.gitWyW3SqPbTSdMZ7AOufYnRiklW02CLKpONhUYPYwA" 79 | } 80 | ] 81 | }, 82 | "options": {} 83 | }, 84 | "type": "n8n-nodes-base.httpRequestTool", 85 | "typeVersion": 4.2, 86 | "position": [ 87 | 80, 88 | 100 89 | ], 90 | "id": "a994ac59-036e-49c4-89a3-fb1131f88ecf", 91 | "name": "GetLocation" 92 | }, 93 | { 94 | "parameters": { 95 | "url": "https://api.biteship.com/v1/maps/areas?countries=ID&input=parung&type=single", 96 | "sendHeaders": true, 97 | "headerParameters": { 98 | "parameters": [ 99 | { 100 | "name": "authorization", 101 | "value": "biteship_live.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoibjhuIiwidXNlcklkIjoiNjg3NDY2ZTNmM2Q2NWEwMDEzNDQ4YWFiIiwiaWF0IjoxNzUyNDU5MDY0fQ.gitWyW3SqPbTSdMZ7AOufYnRiklW02CLKpONhUYPYwA" 102 | } 103 | ] 104 | }, 105 | "options": {} 106 | }, 107 | "type": "n8n-nodes-base.httpRequest", 108 | "typeVersion": 4.2, 109 | "position": [ 110 | -380, 111 | 460 112 | ], 113 | "id": "38a82e4c-506e-4d3e-8ace-473374b4cd9c", 114 | "name": "Get Exact Location" 115 | }, 116 | { 117 | "parameters": { 118 | "toolDescription": "Use this endpoint to get shipping rate", 119 | "method": "POST", 120 | "url": "https://api.biteship.com/v1/rates/couriers", 121 | "sendHeaders": true, 122 | "headerParameters": { 123 | "parameters": [ 124 | { 125 | "name": "authorization", 126 | "value": "biteship_live.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoibjhuIiwidXNlcklkIjoiNjg3NDY2ZTNmM2Q2NWEwMDEzNDQ4YWFiIiwiaWF0IjoxNzUyNDU5MDY0fQ.gitWyW3SqPbTSdMZ7AOufYnRiklW02CLKpONhUYPYwA" 127 | } 128 | ] 129 | }, 130 | "sendBody": true, 131 | "specifyBody": "json", 132 | "jsonBody": "={\n \"origin_area_id\": \"IDNP3IDNC445IDND5589IDZ15710\",\n \"destination_area_id\": \"{{$fromAI('destination_id', 'Destination area ID from GetLocation tool')}}\",\n \"couriers\": \"paxel,jne,sicepat\",\n \"items\": {{ $fromAI('items', 'Item list in array') }}\n}", 133 | "options": {} 134 | }, 135 | "type": "n8n-nodes-base.httpRequestTool", 136 | "typeVersion": 4.2, 137 | "position": [ 138 | 240, 139 | 100 140 | ], 141 | "id": "3cd8f43a-67e4-4d86-b9af-b1c9f4d4a738", 142 | "name": "GetRates" 143 | }, 144 | { 145 | "parameters": { 146 | "documentId": { 147 | "__rl": true, 148 | "value": "1mm_JzjkrE4qTeRilnX7TDWuKxsTQ_hDCHrdtJHeeHYw", 149 | "mode": "list", 150 | "cachedResultName": "Chatbot Ongkir Biteship", 151 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mm_JzjkrE4qTeRilnX7TDWuKxsTQ_hDCHrdtJHeeHYw/edit?usp=drivesdk" 152 | }, 153 | "sheetName": { 154 | "__rl": true, 155 | "value": 1869658432, 156 | "mode": "list", 157 | "cachedResultName": "PRODUCTS", 158 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mm_JzjkrE4qTeRilnX7TDWuKxsTQ_hDCHrdtJHeeHYw/edit#gid=1869658432" 159 | }, 160 | "options": {} 161 | }, 162 | "type": "n8n-nodes-base.googleSheetsTool", 163 | "typeVersion": 4.6, 164 | "position": [ 165 | 420, 166 | 100 167 | ], 168 | "id": "a1b1f565-abe9-4d6c-b52e-2abd0d53e6c5", 169 | "name": "GetProducts", 170 | "credentials": { 171 | "googleSheetsOAuth2Api": { 172 | "id": "qKBvcP6SqTA7vqHl", 173 | "name": "Google Sheets account 3" 174 | } 175 | } 176 | } 177 | ], 178 | "pinData": {}, 179 | "connections": { 180 | "When chat message received": { 181 | "main": [ 182 | [ 183 | { 184 | "node": "AI Agent", 185 | "type": "main", 186 | "index": 0 187 | } 188 | ] 189 | ] 190 | }, 191 | "OpenAI Chat Model": { 192 | "ai_languageModel": [ 193 | [ 194 | { 195 | "node": "AI Agent", 196 | "type": "ai_languageModel", 197 | "index": 0 198 | } 199 | ] 200 | ] 201 | }, 202 | "Simple Memory": { 203 | "ai_memory": [ 204 | [ 205 | { 206 | "node": "AI Agent", 207 | "type": "ai_memory", 208 | "index": 0 209 | } 210 | ] 211 | ] 212 | }, 213 | "GetLocation": { 214 | "ai_tool": [ 215 | [ 216 | { 217 | "node": "AI Agent", 218 | "type": "ai_tool", 219 | "index": 0 220 | } 221 | ] 222 | ] 223 | }, 224 | "GetRates": { 225 | "ai_tool": [ 226 | [ 227 | { 228 | "node": "AI Agent", 229 | "type": "ai_tool", 230 | "index": 0 231 | } 232 | ] 233 | ] 234 | }, 235 | "GetProducts": { 236 | "ai_tool": [ 237 | [ 238 | { 239 | "node": "AI Agent", 240 | "type": "ai_tool", 241 | "index": 0 242 | } 243 | ] 244 | ] 245 | } 246 | }, 247 | "active": false, 248 | "settings": { 249 | "executionOrder": "v1" 250 | }, 251 | "versionId": "323e5cfa-bc74-445d-af5d-b35cde394f0c", 252 | "meta": { 253 | "templateCredsSetupCompleted": true, 254 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 255 | }, 256 | "id": "zT7mgcQaKrDFtob2", 257 | "tags": [] 258 | } -------------------------------------------------------------------------------- /ai-wordpress-post-maker.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "URLyfe v2 - Article Maker", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "promptType": "define", 7 | "text": "Buat sesuai perintah ya!", 8 | "hasOutputParser": true, 9 | "messages": { 10 | "messageValues": [ 11 | { 12 | "message": "=Kamu adalah seorang penulis blog paling handal sedunia!\n\nKamu bertugas untuk menulis di sebuah blog bernama URLyfe. Kamu bertugas untuk menentukan salah satu topik dari kategori yang tersedia di URLyfe, lalu membuat judul artikel yang menarik dan relevan di masa sekarang, yaitu tanggal {{ $now.format('yyyy-MM-dd') }}.\n\nJadi output dari kamu adalah nama kategori dan judul artikelnya.\n\nKategori yang diizinkan adalah. PASTIKAN KAMU MEMILIH SALAH SATU CATEGORY SECARA ACAK, JANGAN AMBIL YANG PALING ATAS SAJA :\n\n- Artificial Intelligence (AI)\n- Ekonomi\n- Hiburan\n- Olahraga\n- Sosial\n- Teknologi\n\nPastikan output nama kategori sama persis, termasuk huruf besar kecilnya!\n\n### PENTING ###\n- Jangan buat artikel yang sifatnya berita,\n- Lebih buat artikel yang berjenis sharing tips dan trik saja," 13 | } 14 | ] 15 | } 16 | }, 17 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 18 | "typeVersion": 1.6, 19 | "position": [ 20 | -200, 21 | 320 22 | ], 23 | "id": "07c30574-081b-4841-937a-af59424c93b6", 24 | "name": "Topic Chooser and Title Maker" 25 | }, 26 | { 27 | "parameters": { 28 | "promptType": "define", 29 | "text": "=Judul artikel : {{ $json.output.title }}. Kategori : {{ $json.output.category }}", 30 | "messages": { 31 | "messageValues": [ 32 | { 33 | "message": "=Kamu adalah seorang penulis blog paling handal sedunia!\n\nKamu bertugas untuk menulis di sebuah blog bernama URLyfe. Kamu bertugas untuk membuat artikel yang SEO friendly berdasarkan judul dan topik yang sudah disediakan oleh pengguna.\n\n### PENTING ###\n- Jangan buat artikel yang sifatnya berita,\n- Lebih buat artikel yang berjenis sharing tips dan trik saja,\n- Minimal artikel terdiri dari 1000 kata,\n- Artikel akan diposting langsung ke Wordpress, jadi pastikan formatting nya sesuai dengan formatting wordpress dan jangan tambahkan imbuhan apapun selain isi artikelnya, karena tidak akan dicek dulu\n- Outputnya jangan markdown! Tapi dalam format artikel Wordpress!" 34 | } 35 | ] 36 | } 37 | }, 38 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 39 | "typeVersion": 1.6, 40 | "position": [ 41 | 240, 42 | 320 43 | ], 44 | "id": "f09f23fd-9d59-4331-94bf-375c33b57593", 45 | "name": "Basic LLM Chain" 46 | }, 47 | { 48 | "parameters": { 49 | "model": { 50 | "__rl": true, 51 | "value": "gpt-4.1-mini", 52 | "mode": "list", 53 | "cachedResultName": "gpt-4.1-mini" 54 | }, 55 | "options": {} 56 | }, 57 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 58 | "typeVersion": 1.2, 59 | "position": [ 60 | -100, 61 | 600 62 | ], 63 | "id": "07e921c0-c358-441b-bca4-21607dcb3508", 64 | "name": "Article Maker Model", 65 | "credentials": { 66 | "openAiApi": { 67 | "id": "", 68 | "name": "" 69 | } 70 | } 71 | }, 72 | { 73 | "parameters": { 74 | "model": { 75 | "__rl": true, 76 | "value": "gpt-4.1", 77 | "mode": "list", 78 | "cachedResultName": "gpt-4.1" 79 | }, 80 | "options": {} 81 | }, 82 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 83 | "typeVersion": 1.2, 84 | "position": [ 85 | -460, 86 | 580 87 | ], 88 | "id": "0f3f9629-0822-45f4-b4b8-689527e7e58d", 89 | "name": "Topic Chooser and Title Maker Model", 90 | "credentials": { 91 | "openAiApi": { 92 | "id": "", 93 | "name": "" 94 | } 95 | } 96 | }, 97 | { 98 | "parameters": { 99 | "jsonSchemaExample": "{\n\t\"category\": \"Hiburan\",\n\t\"title\": \"Judul artikel\"\n}" 100 | }, 101 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 102 | "typeVersion": 1.2, 103 | "position": [ 104 | -280, 105 | 580 106 | ], 107 | "id": "185d2277-67ac-4f9a-b78a-09b210d20347", 108 | "name": "Topic Chooser and Title Maker Parser" 109 | }, 110 | { 111 | "parameters": { 112 | "title": "={{ $('Topic Chooser and Title Maker').item.json.output.title }}", 113 | "additionalFields": { 114 | "authorId": 1, 115 | "content": "={{ $json.text }}", 116 | "status": "publish", 117 | "format": "standard", 118 | "categories": "={{$('Topic Chooser and Title Maker').item.json.output.category == \"Artificial Intelligence (AI)\" ? 2 : \n $('Topic Chooser and Title Maker').item.json.output.category == \"Sosial\" ? 3 : \n $('Topic Chooser and Title Maker').item.json.output.category == \"Hiburan\" ? 4 : \n $('Topic Chooser and Title Maker').item.json.output.category == \"Olahraga\" ? 5 :\n$('Topic Chooser and Title Maker').item.json.output.category == \"Teknologi\" ? 1 :\n $('Topic Chooser and Title Maker').item.json.output.category == \"Ekonomi\" ? 6 : \n null}}" 119 | } 120 | }, 121 | "type": "n8n-nodes-base.wordpress", 122 | "typeVersion": 1, 123 | "position": [ 124 | 620, 125 | 320 126 | ], 127 | "id": "fe189309-3ed4-42bc-9df5-a713fb2cce81", 128 | "name": "Wordpress Post Draft", 129 | "credentials": { 130 | "wordpressApi": { 131 | "id": "", 132 | "name": "" 133 | } 134 | } 135 | }, 136 | { 137 | "parameters": { 138 | "resource": "image", 139 | "prompt": "=Buat gambar untuk artikel blog berjudul \"{{ $json.title.raw }}\". Buat yang realistis dan jangan terlalu berfantasi terlalu tinggi.\n\nJangan ada teks sama sekali di gambarnya!", 140 | "options": { 141 | "quality": "standard", 142 | "size": "1024x1024", 143 | "style": "vivid" 144 | } 145 | }, 146 | "type": "@n8n/n8n-nodes-langchain.openAi", 147 | "typeVersion": 1.8, 148 | "position": [ 149 | 100, 150 | 580 151 | ], 152 | "id": "ab100cf3-d2ca-4b1a-b422-d047cfe81fd4", 153 | "name": "OpenAI - Generate Image", 154 | "credentials": { 155 | "openAiApi": { 156 | "id": "", 157 | "name": "" 158 | } 159 | } 160 | }, 161 | { 162 | "parameters": { 163 | "method": "POST", 164 | "url": "https:///wp-json/wp/v2/media", 165 | "authentication": "predefinedCredentialType", 166 | "nodeCredentialType": "wordpressApi", 167 | "sendHeaders": true, 168 | "headerParameters": { 169 | "parameters": [ 170 | { 171 | "name": "Content-Type", 172 | "value": "image/png" 173 | }, 174 | { 175 | "name": "Content-Disposition", 176 | "value": "=attachment; filename={{$now.toMillis()}}.{{ $json.fileExtension }}" 177 | } 178 | ] 179 | }, 180 | "sendBody": true, 181 | "contentType": "binaryData", 182 | "inputDataFieldName": "data", 183 | "options": {} 184 | }, 185 | "type": "n8n-nodes-base.httpRequest", 186 | "typeVersion": 4.2, 187 | "position": [ 188 | 360, 189 | 580 190 | ], 191 | "id": "d8c24397-17ab-46b3-a7dd-48bd6377f65b", 192 | "name": "Upload Image to WP", 193 | "credentials": { 194 | "wordpressApi": { 195 | "id": "", 196 | "name": "" 197 | } 198 | } 199 | }, 200 | { 201 | "parameters": { 202 | "method": "POST", 203 | "url": "=https:///wp-json/wp/v2/posts/{{ $('Wordpress Post Draft').item.json.id }}", 204 | "authentication": "predefinedCredentialType", 205 | "nodeCredentialType": "wordpressApi", 206 | "sendBody": true, 207 | "bodyParameters": { 208 | "parameters": [ 209 | { 210 | "name": "featured_media", 211 | "value": "={{ $json.id }}" 212 | } 213 | ] 214 | }, 215 | "options": {} 216 | }, 217 | "type": "n8n-nodes-base.httpRequest", 218 | "typeVersion": 4.2, 219 | "position": [ 220 | 620, 221 | 580 222 | ], 223 | "id": "870e2dfe-e151-4385-ad5f-68312837a04a", 224 | "name": "Wordpress - Set Featured Image", 225 | "credentials": { 226 | "wordpressApi": { 227 | "id": "", 228 | "name": "" 229 | } 230 | } 231 | }, 232 | { 233 | "parameters": { 234 | "rule": { 235 | "interval": [ 236 | { 237 | "field": "hours", 238 | "hoursInterval": 3 239 | } 240 | ] 241 | } 242 | }, 243 | "type": "n8n-nodes-base.scheduleTrigger", 244 | "typeVersion": 1.2, 245 | "position": [ 246 | -440, 247 | 320 248 | ], 249 | "id": "c46e124e-f37c-4c9d-b6f3-4264e46d4dc9", 250 | "name": "Schedule Trigger" 251 | } 252 | ], 253 | "pinData": {}, 254 | "connections": { 255 | "Topic Chooser and Title Maker": { 256 | "main": [ 257 | [ 258 | { 259 | "node": "Basic LLM Chain", 260 | "type": "main", 261 | "index": 0 262 | } 263 | ] 264 | ] 265 | }, 266 | "Article Maker Model": { 267 | "ai_languageModel": [ 268 | [ 269 | { 270 | "node": "Basic LLM Chain", 271 | "type": "ai_languageModel", 272 | "index": 0 273 | } 274 | ] 275 | ] 276 | }, 277 | "Topic Chooser and Title Maker Model": { 278 | "ai_languageModel": [ 279 | [ 280 | { 281 | "node": "Topic Chooser and Title Maker", 282 | "type": "ai_languageModel", 283 | "index": 0 284 | } 285 | ] 286 | ] 287 | }, 288 | "Topic Chooser and Title Maker Parser": { 289 | "ai_outputParser": [ 290 | [ 291 | { 292 | "node": "Topic Chooser and Title Maker", 293 | "type": "ai_outputParser", 294 | "index": 0 295 | } 296 | ] 297 | ] 298 | }, 299 | "Basic LLM Chain": { 300 | "main": [ 301 | [ 302 | { 303 | "node": "Wordpress Post Draft", 304 | "type": "main", 305 | "index": 0 306 | } 307 | ] 308 | ] 309 | }, 310 | "Wordpress Post Draft": { 311 | "main": [ 312 | [ 313 | { 314 | "node": "OpenAI - Generate Image", 315 | "type": "main", 316 | "index": 0 317 | } 318 | ] 319 | ] 320 | }, 321 | "OpenAI - Generate Image": { 322 | "main": [ 323 | [ 324 | { 325 | "node": "Upload Image to WP", 326 | "type": "main", 327 | "index": 0 328 | } 329 | ] 330 | ] 331 | }, 332 | "Upload Image to WP": { 333 | "main": [ 334 | [ 335 | { 336 | "node": "Wordpress - Set Featured Image", 337 | "type": "main", 338 | "index": 0 339 | } 340 | ] 341 | ] 342 | }, 343 | "Schedule Trigger": { 344 | "main": [ 345 | [ 346 | { 347 | "node": "Topic Chooser and Title Maker", 348 | "type": "main", 349 | "index": 0 350 | } 351 | ] 352 | ] 353 | } 354 | }, 355 | "active": true, 356 | "settings": { 357 | "executionOrder": "v1" 358 | }, 359 | "versionId": "9b398004-0047-4d2c-85bf-e8f54adb832e", 360 | "meta": { 361 | "templateCredsSetupCompleted": true, 362 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 363 | }, 364 | "id": "kSpV7znkD2XELW6Z", 365 | "tags": [] 366 | } -------------------------------------------------------------------------------- /ai-accounting-staff.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AI Accounting Staff", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "toolDescription": "Get available accounts on ERPNext", 7 | "url": "https://erpnexturl.com/api/resource/Account?filters=[[\"company\", \"=\", \"Company Name\"]]&fields=[\"name\", \"is_group\", \"root_type\"]&limit_page_length=1000", 8 | "authentication": "genericCredentialType", 9 | "genericAuthType": "httpBasicAuth", 10 | "options": {} 11 | }, 12 | "type": "n8n-nodes-base.httpRequestTool", 13 | "typeVersion": 4.2, 14 | "position": [ 15 | 300, 16 | 220 17 | ], 18 | "id": "c8ddcc5e-fa74-4c10-8e8f-911aa6fdf85e", 19 | "name": "GetAvailableAccounts", 20 | "credentials": { 21 | "httpBasicAuth": { 22 | "id": "Uzw4EeAzIIQH5JtY", 23 | "name": "ERPNext - erpnexturl.com" 24 | } 25 | } 26 | }, 27 | { 28 | "parameters": { 29 | "model": { 30 | "__rl": true, 31 | "value": "gpt-4.1-mini", 32 | "mode": "list", 33 | "cachedResultName": "gpt-4.1-mini" 34 | }, 35 | "options": {} 36 | }, 37 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 38 | "typeVersion": 1.2, 39 | "position": [ 40 | 120, 41 | 220 42 | ], 43 | "id": "0b8b8dfe-b432-48fd-9d09-50417e610b3a", 44 | "name": "OpenAI Chat Model", 45 | "credentials": { 46 | "openAiApi": { 47 | "id": "hv8gIsU1smdB2KAz", 48 | "name": "OpenAi account - Aji Prakoso" 49 | } 50 | } 51 | }, 52 | { 53 | "parameters": { 54 | "jsonSchemaExample": "{\n \"journals\": {\n \"title\": \"\",\n \"docstatus\": \"1\",\n \"posting_date\": \"\",\n \"root_type\": \"Journal Entry\",\n \"company\": \"Jipraks Digital Indonesia\",\n \"total_debit\": \"\",\n \"total_credit\": \"\",\n \"user_remark\": \"\",\n \"accounts\": [\n {\n \"account\": \"1111.001 - Kas Kecil - JDI\",\n \"against_account\": \"5130.005 - Biaya Alat Tulis Kantor - JDI\",\n \"debit_in_account_currency\": 0,\n \"debit\": 0,\n \"credit_in_account_currency\": 100000,\n \"credit\": 100000,\n \"doctype\": \"Journal Entry Account\"\n },\n {\n \"account\": \"5130.005 - Biaya Alat Tulis Kantor - JDI\",\n \"against_account\": \"1111.001 - Kas Kecil - JDI\",\n \"debit_in_account_currency\": 100000,\n \"debit\": 100000,\n \"credit_in_account_currency\": 0,\n \"credit\": 0,\n \"doctype\": \"Journal Entry Account\"\n }\n ]\n },\n \"info\": \"Dari keterangan dan nominal yang Anda berikan, saya akan membuat jurnal dengan detail : \"\n}" 55 | }, 56 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 57 | "typeVersion": 1.2, 58 | "position": [ 59 | 500, 60 | 220 61 | ], 62 | "id": "a342df9f-9aac-4ff9-b231-4995f13de893", 63 | "name": "Structured Output Parser" 64 | }, 65 | { 66 | "parameters": { 67 | "promptType": "define", 68 | "text": "=Keterangan Transaksi : {{ $json.query.remark }}\nNominal (Rupiah) : {{ $json.query.amount }}", 69 | "hasOutputParser": true, 70 | "options": { 71 | "systemMessage": "=# System Prompt untuk AI Agent Jurnal ERPNext\n\nSekarang adalah tanggal {{ $now.format('yyyy-MM-dd HH:mm:ss') }}\n\nAnda adalah seorang staf akunting profesional dengan pengalaman lebih dari 10 tahun di ERPNext. \nTugas Anda adalah memetakan setiap transaksi user ke dalam jurnal yang **seimbang** (debit = credit) dengan memilih akun CoA yang benar.\n\n---\n\n## 1. Ambil daftar CoA\n- Panggil tool:\n ```text\n GetAvailableAccounts()\n ```\n- Tool akan mengembalikan array objek akun:\n - `name` (string) \n - `is_group` (0 = leaf account, 1 = group header) \n - `root_type` (Asset, Liability, Equity, Income, Expense) \n\n## 2. Aturan Pemilihan Akun\n- **Hanya** pilih akun dengan `is_group = 0`. \n- Map `root_type` ke sisi jurnal: \n - **Asset** & **Expense** → Debit (bertambah) / Credit (berkurang) \n - **Liability**, **Equity** & **Income** → Credit (bertambah) / Debit (berkurang) \n- Pilih akun `name` yang paling relevan dengan deskripsi transaksi (keyword match).\n\n## 3. Proses Penentuan\n1. Baca deskripsi transaksi user (pembayaran, penerimaan, beban, penjualan, dll). \n2. Identifikasi jumlah dan sisi (Debit/Credit) untuk akun yang sesuai. \n3. Jika ada lebih dari satu akun leaf cocok, ajukan pertanyaan klarifikasi ke user.\n\n## 4. Output Format\nKembalikan **hanya** JSON dengan struktur berikut:\n```json\n{\n \"journals\": {\n \"title\": \"\",\n \"docstatus\": \"1\",\n \"posting_date\": \"\",\n \"root_type\": \"Journal Entry\",\n \"company\": \"Jipraks Digital Indonesia\",\n \"total_debit\": \"\",\n \"total_credit\": \"\",\n \"user_remark\": \"\",\n \"accounts\": [\n {\n \"account\": \"\",\n \"against_account\": \"\",\n \"debit_in_account_currency\": 0.0,\n \"debit\": 0.0,\n \"credit_in_account_currency\": 100000.0,\n \"credit\": 100000.0,\n \"doctype\": \"Journal Entry Account\"\n },\n {\n \"account\": \"\",\n \"against_account\": \"\",\n \"debit_in_account_currency\": 100000.0,\n \"debit\": 100000.0,\n \"credit_in_account_currency\": 0.0,\n \"credit\": 0.0,\n \"doctype\": \"Journal Entry Account\"\n }\n ]\n },\n \"info\": \"Dari keterangan dan nominal yang Anda berikan, saya akan membuat jurnal dengan detail : \"\n}\n```\n- `journals` berisi objek lengkap siap dikirim ke ERPNext. \n- `accounts` adalah array dengan detail akun debit dan credit, termasuk `against_account`. \n- `info` adalah satu kalimat ringkasan alasan pemilihan akun dan detail jumlah.\n\n## 5. Contoh\nTransaksi: “Tukar USD 500.000 ke Kas Besar” \n```json\n{\n \"journals\": {\n \"title\": \"Tukar USD ke Kas Besar\",\n \"docstatus\": \"1\",\n \"posting_date\": \"2025-05-28 09:00:00\",\n \"root_type\": \"Journal Entry\",\n \"company\": \"Jipraks Digital Indonesia\",\n \"total_debit\": 500000.0,\n \"total_credit\": 500000.0,\n \"user_remark\": \"Tukar USD ke Kas Besar - Dibuat oleh AI\",\n \"accounts\": [\n {\n \"account\": \"1112.001 - Kas USD - JDI\",\n \"against_account\": \"1111.002 - Kas Besar - JDI\",\n \"debit_in_account_currency\": 500000.0,\n \"debit\": 500000.0,\n \"credit_in_account_currency\": 0.0,\n \"credit\": 0.0,\n \"doctype\": \"Journal Entry Account\"\n },\n {\n \"account\": \"1111.002 - Kas Besar - JDI\",\n \"against_account\": \"1112.001 - Kas USD - JDI\",\n \"debit_in_account_currency\": 0.0,\n \"debit\": 0.0,\n \"credit_in_account_currency\": 500000.0,\n \"credit\": 500000.0,\n \"doctype\": \"Journal Entry Account\"\n }\n ]\n },\n \"info\": \"Dari keterangan dan nominal yang Anda berikan, saya akan membuat jurnal dengan detail : Debit 1112.001 - Kas USD - JDI dan Credit 1111.002 - Kas Besar - JDI sebesar 500,000.\"\n}\n```\n\n--- \nJalankan alur ini setiap kali user mengirimkan detail transaksi baru, dan pastikan jurnal yang dihasilkan **balance** (debit = credit). \n" 72 | } 73 | }, 74 | "type": "@n8n/n8n-nodes-langchain.agent", 75 | "typeVersion": 1.9, 76 | "position": [ 77 | 220, 78 | 0 79 | ], 80 | "id": "482a6087-a5a7-4ca5-a691-9be8f6c682b6", 81 | "name": "Accounting AI Agent" 82 | }, 83 | { 84 | "parameters": { 85 | "path": "ai-accounting", 86 | "responseMode": "responseNode", 87 | "options": {} 88 | }, 89 | "type": "n8n-nodes-base.webhook", 90 | "typeVersion": 2, 91 | "position": [ 92 | -400, 93 | 0 94 | ], 95 | "id": "7272ff1e-4d1f-4778-b900-17b6c4ae83ca", 96 | "name": "Webhook", 97 | "webhookId": "b37dbb61-3b0d-4e00-89ec-01fa3e03bea4" 98 | }, 99 | { 100 | "parameters": { 101 | "conditions": { 102 | "options": { 103 | "caseSensitive": true, 104 | "leftValue": "", 105 | "typeValidation": "strict", 106 | "version": 2 107 | }, 108 | "conditions": [ 109 | { 110 | "id": "d2a18517-6d12-44c9-bd0c-19aaedb673c0", 111 | "leftValue": "={{ $json.query.amount }}", 112 | "rightValue": "", 113 | "operator": { 114 | "type": "string", 115 | "operation": "exists", 116 | "singleValue": true 117 | } 118 | }, 119 | { 120 | "id": "12516172-341e-4dd3-8544-4c2a4eccd034", 121 | "leftValue": "={{ $json.query.remark }}", 122 | "rightValue": "", 123 | "operator": { 124 | "type": "string", 125 | "operation": "exists", 126 | "singleValue": true 127 | } 128 | } 129 | ], 130 | "combinator": "and" 131 | }, 132 | "options": {} 133 | }, 134 | "type": "n8n-nodes-base.if", 135 | "typeVersion": 2.2, 136 | "position": [ 137 | -180, 138 | 0 139 | ], 140 | "id": "b823d96e-ade1-4ef0-9de2-5564a5c9dad4", 141 | "name": "If Parameter Complete" 142 | }, 143 | { 144 | "parameters": { 145 | "respondWith": "json", 146 | "responseBody": "{\n \"message\": \"Incomplete params\"\n}", 147 | "options": { 148 | "responseCode": 400 149 | } 150 | }, 151 | "type": "n8n-nodes-base.respondToWebhook", 152 | "typeVersion": 1.2, 153 | "position": [ 154 | -180, 155 | 300 156 | ], 157 | "id": "ce9c4a33-c6d5-4122-b277-07ddc00214e7", 158 | "name": "400 Error" 159 | }, 160 | { 161 | "parameters": { 162 | "respondWith": "json", 163 | "responseBody": "={{ $json.output }}", 164 | "options": { 165 | "responseCode": 200 166 | } 167 | }, 168 | "type": "n8n-nodes-base.respondToWebhook", 169 | "typeVersion": 1.2, 170 | "position": [ 171 | 640, 172 | 0 173 | ], 174 | "id": "c12a0e1b-c3c4-4b15-9470-d36bd0b60b0c", 175 | "name": "200 OK" 176 | }, 177 | { 178 | "parameters": { 179 | "httpMethod": "POST", 180 | "path": "ai-accounting", 181 | "options": {} 182 | }, 183 | "type": "n8n-nodes-base.webhook", 184 | "typeVersion": 2, 185 | "position": [ 186 | -400, 187 | 580 188 | ], 189 | "id": "42b3f5ba-8e89-4c4a-9b08-33b0e3b639f0", 190 | "name": "POST /ai-accounting", 191 | "webhookId": "b37dbb61-3b0d-4e00-89ec-01fa3e03bea4" 192 | }, 193 | { 194 | "parameters": { 195 | "method": "POST", 196 | "url": "https://erpnexturl.com/api/resource/Journal Entry", 197 | "authentication": "genericCredentialType", 198 | "genericAuthType": "httpBasicAuth", 199 | "sendBody": true, 200 | "specifyBody": "json", 201 | "jsonBody": "={{ $json.body.journals }}", 202 | "options": {} 203 | }, 204 | "type": "n8n-nodes-base.httpRequest", 205 | "typeVersion": 4.2, 206 | "position": [ 207 | -180, 208 | 580 209 | ], 210 | "id": "e24f0a9c-fa31-41b1-b77d-d45fd741a58a", 211 | "name": "Post Journal to ERPNext", 212 | "credentials": { 213 | "httpBasicAuth": { 214 | "id": "Uzw4EeAzIIQH5JtY", 215 | "name": "ERPNext - erpnexturl.com" 216 | } 217 | } 218 | } 219 | ], 220 | "pinData": {}, 221 | "connections": { 222 | "GetAvailableAccounts": { 223 | "ai_tool": [ 224 | [ 225 | { 226 | "node": "Accounting AI Agent", 227 | "type": "ai_tool", 228 | "index": 0 229 | } 230 | ] 231 | ] 232 | }, 233 | "OpenAI Chat Model": { 234 | "ai_languageModel": [ 235 | [ 236 | { 237 | "node": "Accounting AI Agent", 238 | "type": "ai_languageModel", 239 | "index": 0 240 | } 241 | ] 242 | ] 243 | }, 244 | "Structured Output Parser": { 245 | "ai_outputParser": [ 246 | [ 247 | { 248 | "node": "Accounting AI Agent", 249 | "type": "ai_outputParser", 250 | "index": 0 251 | } 252 | ] 253 | ] 254 | }, 255 | "Webhook": { 256 | "main": [ 257 | [ 258 | { 259 | "node": "If Parameter Complete", 260 | "type": "main", 261 | "index": 0 262 | } 263 | ] 264 | ] 265 | }, 266 | "If Parameter Complete": { 267 | "main": [ 268 | [ 269 | { 270 | "node": "Accounting AI Agent", 271 | "type": "main", 272 | "index": 0 273 | } 274 | ], 275 | [ 276 | { 277 | "node": "400 Error", 278 | "type": "main", 279 | "index": 0 280 | } 281 | ] 282 | ] 283 | }, 284 | "Accounting AI Agent": { 285 | "main": [ 286 | [ 287 | { 288 | "node": "200 OK", 289 | "type": "main", 290 | "index": 0 291 | } 292 | ] 293 | ] 294 | }, 295 | "POST /ai-accounting": { 296 | "main": [ 297 | [ 298 | { 299 | "node": "Post Journal to ERPNext", 300 | "type": "main", 301 | "index": 0 302 | } 303 | ] 304 | ] 305 | } 306 | }, 307 | "active": false, 308 | "settings": { 309 | "executionOrder": "v1" 310 | }, 311 | "versionId": "99b65651-28ac-4a95-9d32-96c1397711e2", 312 | "meta": { 313 | "templateCredsSetupCompleted": true, 314 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 315 | }, 316 | "id": "w5ZbFUh5SoExM5cB", 317 | "tags": [] 318 | } -------------------------------------------------------------------------------- /whatsapp-waha-hold-chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WA Chatbot Labels Hold", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "promptType": "define", 7 | "text": "={{ $('WAHA Trigger').item.json.payload.body }}", 8 | "options": { 9 | "systemMessage": "=Kamu adalah seorang tukang kopi handal!" 10 | } 11 | }, 12 | "type": "@n8n/n8n-nodes-langchain.agent", 13 | "typeVersion": 2, 14 | "position": [ 15 | 1420, 16 | -20 17 | ], 18 | "id": "45034d46-5aae-46ab-a6fb-5c21db7c05da", 19 | "name": "AI Agent" 20 | }, 21 | { 22 | "parameters": { 23 | "model": { 24 | "__rl": true, 25 | "value": "gpt-4.1-mini", 26 | "mode": "list", 27 | "cachedResultName": "gpt-4.1-mini" 28 | }, 29 | "options": {} 30 | }, 31 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 32 | "typeVersion": 1.2, 33 | "position": [ 34 | 1420, 35 | 260 36 | ], 37 | "id": "b4993cae-cb3d-40d1-9673-2783ea31d230", 38 | "name": "OpenAI Chat Model", 39 | "credentials": { 40 | "openAiApi": { 41 | "id": "y8sLJ2LzZL2c7SGi", 42 | "name": "OpenAI Webinar" 43 | } 44 | } 45 | }, 46 | { 47 | "parameters": { 48 | "sessionIdType": "customKey", 49 | "sessionKey": "={{ $('WAHA Trigger').item.json.payload.from }}C" 50 | }, 51 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 52 | "typeVersion": 1.3, 53 | "position": [ 54 | 1580, 55 | 260 56 | ], 57 | "id": "94088ee8-2ad2-4c7b-ba4e-66db2af375c9", 58 | "name": "Simple Memory" 59 | }, 60 | { 61 | "parameters": {}, 62 | "type": "@devlikeapro/n8n-nodes-waha.wahaTrigger", 63 | "typeVersion": 202502, 64 | "position": [ 65 | -300, 66 | -280 67 | ], 68 | "id": "13cf824f-50c8-4510-8cf3-b38b00b87d46", 69 | "name": "WAHA Trigger", 70 | "webhookId": "19ac894d-2054-40f7-bce1-848cbc80adfe" 71 | }, 72 | { 73 | "parameters": { 74 | "conditions": { 75 | "options": { 76 | "caseSensitive": true, 77 | "leftValue": "", 78 | "typeValidation": "strict", 79 | "version": 2 80 | }, 81 | "conditions": [ 82 | { 83 | "id": "b3602e7c-a540-47f9-ba41-cef2b5b9fd29", 84 | "leftValue": "={{ $json.payload.fromMe }}", 85 | "rightValue": "", 86 | "operator": { 87 | "type": "boolean", 88 | "operation": "true", 89 | "singleValue": true 90 | } 91 | } 92 | ], 93 | "combinator": "and" 94 | }, 95 | "options": {} 96 | }, 97 | "type": "n8n-nodes-base.if", 98 | "typeVersion": 2.2, 99 | "position": [ 100 | 80, 101 | -180 102 | ], 103 | "id": "59eb4652-3726-4ed2-a442-e3e2241e4c76", 104 | "name": "If From Me" 105 | }, 106 | { 107 | "parameters": { 108 | "conditions": { 109 | "options": { 110 | "caseSensitive": true, 111 | "leftValue": "", 112 | "typeValidation": "strict", 113 | "version": 2 114 | }, 115 | "conditions": [ 116 | { 117 | "id": "ac89cc91-c202-498c-a7f0-acdffccf8821", 118 | "leftValue": "={{ $json.payload.from.split('@')[1] }}", 119 | "rightValue": "c.us", 120 | "operator": { 121 | "type": "string", 122 | "operation": "equals", 123 | "name": "filter.operator.equals" 124 | } 125 | } 126 | ], 127 | "combinator": "and" 128 | }, 129 | "options": {} 130 | }, 131 | "type": "n8n-nodes-base.if", 132 | "typeVersion": 2.2, 133 | "position": [ 134 | 400, 135 | -20 136 | ], 137 | "id": "ae664438-73c9-4e43-a632-4d2018c8a6ae", 138 | "name": "Make Sure Personal Chat" 139 | }, 140 | { 141 | "parameters": { 142 | "content": "## Check if Message isFromMe", 143 | "height": 260, 144 | "width": 380, 145 | "color": 3 146 | }, 147 | "type": "n8n-nodes-base.stickyNote", 148 | "position": [ 149 | -60, 150 | -260 151 | ], 152 | "typeVersion": 1, 153 | "id": "b8e52cb1-50e0-417c-8235-4ba72575e18a", 154 | "name": "Sticky Note" 155 | }, 156 | { 157 | "parameters": { 158 | "content": "## If isFromMe is true and source is app\nhold user chat. So next conversation will be handled by real agent", 159 | "height": 260, 160 | "width": 960, 161 | "color": 3 162 | }, 163 | "type": "n8n-nodes-base.stickyNote", 164 | "position": [ 165 | 340, 166 | -400 167 | ], 168 | "typeVersion": 1, 169 | "id": "b6b994c2-5f18-4d1a-a3c3-23bd45a26a12", 170 | "name": "Sticky Note1" 171 | }, 172 | { 173 | "parameters": { 174 | "content": "## If isFromMe False\nCheck if user is on hold list or not, if on list, ignore message", 175 | "height": 260, 176 | "width": 960, 177 | "color": 4 178 | }, 179 | "type": "n8n-nodes-base.stickyNote", 180 | "position": [ 181 | 340, 182 | -120 183 | ], 184 | "typeVersion": 1, 185 | "id": "34892985-eeaa-4cc9-8588-e1df53086f76", 186 | "name": "Sticky Note2" 187 | }, 188 | { 189 | "parameters": { 190 | "content": "## The Brain 🧠 ", 191 | "height": 560, 192 | "width": 440 193 | }, 194 | "type": "n8n-nodes-base.stickyNote", 195 | "position": [ 196 | 1320, 197 | -120 198 | ], 199 | "typeVersion": 1, 200 | "id": "a9892fdb-c109-41e2-b66e-a6d4af7591f2", 201 | "name": "Sticky Note3" 202 | }, 203 | { 204 | "parameters": { 205 | "resource": "Chatting", 206 | "operation": "Stop Typing", 207 | "session": "={{ $('WAHA Trigger').item.json.session }}", 208 | "chatId": "={{ $('WAHA Trigger').item.json.payload.from }}", 209 | "requestOptions": {} 210 | }, 211 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 212 | "typeVersion": 202502, 213 | "position": [ 214 | 2420, 215 | -20 216 | ], 217 | "id": "c94b7899-4705-4034-b438-23947b6018b0", 218 | "name": "Stop Typing", 219 | "credentials": { 220 | "wahaApi": { 221 | "id": "k7O781BLydKgHzVo", 222 | "name": "WAHA Account Sumopod" 223 | } 224 | } 225 | }, 226 | { 227 | "parameters": { 228 | "content": "## Typing Effect", 229 | "height": 260, 230 | "width": 860, 231 | "color": 5 232 | }, 233 | "type": "n8n-nodes-base.stickyNote", 234 | "position": [ 235 | 1780, 236 | -120 237 | ], 238 | "typeVersion": 1, 239 | "id": "caeea791-c757-4b00-9984-c071fbc35b38", 240 | "name": "Sticky Note5" 241 | }, 242 | { 243 | "parameters": { 244 | "content": "## Send Reply", 245 | "height": 280, 246 | "width": 860, 247 | "color": 4 248 | }, 249 | "type": "n8n-nodes-base.stickyNote", 250 | "position": [ 251 | 1780, 252 | 160 253 | ], 254 | "typeVersion": 1, 255 | "id": "4ec9bdf2-6334-44d0-b1a5-447c452ebef4", 256 | "name": "Sticky Note6" 257 | }, 258 | { 259 | "parameters": { 260 | "resource": "Chatting", 261 | "operation": "Send Text", 262 | "session": "={{ $('WAHA Trigger').item.json.session }}", 263 | "chatId": "={{ $('If From Me').item.json.payload.from }}", 264 | "text": "={{ $('AI Agent').item.json.output }}", 265 | "requestOptions": {} 266 | }, 267 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 268 | "typeVersion": 202502, 269 | "position": [ 270 | 2160, 271 | 260 272 | ], 273 | "id": "c550f0db-759d-4c29-96fa-7f7a6b149bcc", 274 | "name": "Send Reply", 275 | "credentials": { 276 | "wahaApi": { 277 | "id": "k7O781BLydKgHzVo", 278 | "name": "WAHA Account Sumopod" 279 | } 280 | } 281 | }, 282 | { 283 | "parameters": { 284 | "conditions": { 285 | "options": { 286 | "caseSensitive": true, 287 | "leftValue": "", 288 | "typeValidation": "strict", 289 | "version": 2 290 | }, 291 | "conditions": [ 292 | { 293 | "id": "68697ad3-d3dc-4a26-81cd-077c551572b1", 294 | "leftValue": "={{ $json.payload.source }}", 295 | "rightValue": "app", 296 | "operator": { 297 | "type": "string", 298 | "operation": "equals", 299 | "name": "filter.operator.equals" 300 | } 301 | } 302 | ], 303 | "combinator": "and" 304 | }, 305 | "options": {} 306 | }, 307 | "type": "n8n-nodes-base.if", 308 | "typeVersion": 2.2, 309 | "position": [ 310 | 580, 311 | -300 312 | ], 313 | "id": "a80e7040-924c-4f19-9002-fc123ca31a7f", 314 | "name": "If Source is app" 315 | }, 316 | { 317 | "parameters": { 318 | "resource": "Chatting", 319 | "operation": "Start Typing", 320 | "session": "={{ $('WAHA Trigger').item.json.session }}", 321 | "chatId": "={{ $('WAHA Trigger').item.json.payload.from }}", 322 | "requestOptions": {} 323 | }, 324 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 325 | "typeVersion": 202502, 326 | "position": [ 327 | 1880, 328 | -20 329 | ], 330 | "id": "a5512b9b-7e8f-4945-ace3-0ba159a0f1b3", 331 | "name": "Start Typing", 332 | "credentials": { 333 | "wahaApi": { 334 | "id": "k7O781BLydKgHzVo", 335 | "name": "WAHA Account Sumopod" 336 | } 337 | } 338 | }, 339 | { 340 | "parameters": { 341 | "amount": "={{ Math.floor(Math.random() * 7) + 1; }}" 342 | }, 343 | "type": "n8n-nodes-base.wait", 344 | "typeVersion": 1.1, 345 | "position": [ 346 | 2160, 347 | -20 348 | ], 349 | "id": "80bbd697-dfb7-40a3-9259-1b8677a03eca", 350 | "name": "Wait for Random Seconds", 351 | "webhookId": "eba829bd-e335-4656-a307-7315dd29c05f" 352 | }, 353 | { 354 | "parameters": { 355 | "resource": "Labels", 356 | "operation": "Get Chat Labels", 357 | "requestOptions": {} 358 | }, 359 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 360 | "typeVersion": 202502, 361 | "position": [ 362 | 640, 363 | -20 364 | ], 365 | "id": "8c84fee7-c978-47d9-ae50-d7e40b7073a7", 366 | "name": "GetLabels", 367 | "alwaysOutputData": true, 368 | "executeOnce": false, 369 | "credentials": { 370 | "wahaApi": { 371 | "id": "k7O781BLydKgHzVo", 372 | "name": "WAHA Account Sumopod" 373 | } 374 | } 375 | }, 376 | { 377 | "parameters": { 378 | "aggregate": "aggregateAllItemData", 379 | "options": {} 380 | }, 381 | "type": "n8n-nodes-base.aggregate", 382 | "typeVersion": 1, 383 | "position": [ 384 | 860, 385 | -20 386 | ], 387 | "id": "2c2355d5-b080-4069-9521-1601a731e50c", 388 | "name": "Aggregate" 389 | }, 390 | { 391 | "parameters": { 392 | "conditions": { 393 | "options": { 394 | "caseSensitive": true, 395 | "leftValue": "", 396 | "typeValidation": "strict", 397 | "version": 2 398 | }, 399 | "conditions": [ 400 | { 401 | "id": "868c6a77-c8be-44e2-85d1-a8ac579f2548", 402 | "leftValue": "={{ $json.data.some(item => item.name === \"HOLD\") }}", 403 | "rightValue": "", 404 | "operator": { 405 | "type": "boolean", 406 | "operation": "true", 407 | "singleValue": true 408 | } 409 | } 410 | ], 411 | "combinator": "and" 412 | }, 413 | "options": {} 414 | }, 415 | "type": "n8n-nodes-base.if", 416 | "typeVersion": 2.2, 417 | "position": [ 418 | 1080, 419 | -20 420 | ], 421 | "id": "67571cc1-2238-4dd8-9d84-c3e6e1aeab02", 422 | "name": "If On Hold" 423 | }, 424 | { 425 | "parameters": { 426 | "resource": "Labels", 427 | "operation": "Put Chat Labels", 428 | "labels": "[\n {\n \"id\": \"9\"\n }\n]", 429 | "requestOptions": {} 430 | }, 431 | "type": "@devlikeapro/n8n-nodes-waha.WAHA", 432 | "typeVersion": 202502, 433 | "position": [ 434 | 900, 435 | -300 436 | ], 437 | "id": "3d4cacf8-e903-42a2-8a90-5a7e74901e59", 438 | "name": "Set Hold Label", 439 | "credentials": { 440 | "wahaApi": { 441 | "id": "k7O781BLydKgHzVo", 442 | "name": "WAHA Account Sumopod" 443 | } 444 | } 445 | } 446 | ], 447 | "pinData": {}, 448 | "connections": { 449 | "OpenAI Chat Model": { 450 | "ai_languageModel": [ 451 | [ 452 | { 453 | "node": "AI Agent", 454 | "type": "ai_languageModel", 455 | "index": 0 456 | } 457 | ] 458 | ] 459 | }, 460 | "Simple Memory": { 461 | "ai_memory": [ 462 | [ 463 | { 464 | "node": "AI Agent", 465 | "type": "ai_memory", 466 | "index": 0 467 | } 468 | ] 469 | ] 470 | }, 471 | "WAHA Trigger": { 472 | "main": [ 473 | [], 474 | [], 475 | [], 476 | [ 477 | { 478 | "node": "If From Me", 479 | "type": "main", 480 | "index": 0 481 | } 482 | ] 483 | ] 484 | }, 485 | "If From Me": { 486 | "main": [ 487 | [ 488 | { 489 | "node": "If Source is app", 490 | "type": "main", 491 | "index": 0 492 | } 493 | ], 494 | [ 495 | { 496 | "node": "Make Sure Personal Chat", 497 | "type": "main", 498 | "index": 0 499 | } 500 | ] 501 | ] 502 | }, 503 | "Make Sure Personal Chat": { 504 | "main": [ 505 | [ 506 | { 507 | "node": "GetLabels", 508 | "type": "main", 509 | "index": 0 510 | } 511 | ] 512 | ] 513 | }, 514 | "AI Agent": { 515 | "main": [ 516 | [ 517 | { 518 | "node": "Start Typing", 519 | "type": "main", 520 | "index": 0 521 | } 522 | ] 523 | ] 524 | }, 525 | "Stop Typing": { 526 | "main": [ 527 | [ 528 | { 529 | "node": "Send Reply", 530 | "type": "main", 531 | "index": 0 532 | } 533 | ] 534 | ] 535 | }, 536 | "If Source is app": { 537 | "main": [ 538 | [ 539 | { 540 | "node": "Set Hold Label", 541 | "type": "main", 542 | "index": 0 543 | } 544 | ] 545 | ] 546 | }, 547 | "Wait for Random Seconds": { 548 | "main": [ 549 | [ 550 | { 551 | "node": "Stop Typing", 552 | "type": "main", 553 | "index": 0 554 | } 555 | ] 556 | ] 557 | }, 558 | "Start Typing": { 559 | "main": [ 560 | [ 561 | { 562 | "node": "Wait for Random Seconds", 563 | "type": "main", 564 | "index": 0 565 | } 566 | ] 567 | ] 568 | }, 569 | "GetLabels": { 570 | "main": [ 571 | [ 572 | { 573 | "node": "Aggregate", 574 | "type": "main", 575 | "index": 0 576 | } 577 | ] 578 | ] 579 | }, 580 | "Aggregate": { 581 | "main": [ 582 | [ 583 | { 584 | "node": "If On Hold", 585 | "type": "main", 586 | "index": 0 587 | } 588 | ] 589 | ] 590 | }, 591 | "If On Hold": { 592 | "main": [ 593 | [], 594 | [ 595 | { 596 | "node": "AI Agent", 597 | "type": "main", 598 | "index": 0 599 | } 600 | ] 601 | ] 602 | } 603 | }, 604 | "active": false, 605 | "settings": { 606 | "executionOrder": "v1" 607 | }, 608 | "versionId": "9e8dd3b7-c4fe-4ac2-96cc-8b0f3f43333a", 609 | "meta": { 610 | "templateCredsSetupCompleted": true, 611 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 612 | }, 613 | "id": "RpwPfssbP3lnAE1T", 614 | "tags": [] 615 | } -------------------------------------------------------------------------------- /hr-ai-agent.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HR AI", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "formTitle": "Formulir Lamaran Kerja", 7 | "formDescription": "Isi data diri Anda untuk melamar di PT. Jago Otomasi Indonesia", 8 | "formFields": { 9 | "values": [ 10 | { 11 | "fieldLabel": "Nama Lengkap", 12 | "requiredField": true 13 | }, 14 | { 15 | "fieldLabel": "Tanggal Lahir", 16 | "fieldType": "date", 17 | "requiredField": true 18 | }, 19 | { 20 | "fieldLabel": "Posisi Yang Dilamar", 21 | "fieldType": "dropdown", 22 | "fieldOptions": { 23 | "values": [ 24 | { 25 | "option": "ITJRDEV - Junior Developer" 26 | }, 27 | { 28 | "option": "ITSRDEV - Senior Developer" 29 | }, 30 | { 31 | "option": "ITBEDEV - Backend Developer" 32 | }, 33 | { 34 | "option": "ITFEDEV - Frontend Developer" 35 | } 36 | ] 37 | }, 38 | "requiredField": true 39 | }, 40 | { 41 | "fieldLabel": "Upload CV (.pdf)", 42 | "fieldType": "file", 43 | "multipleFiles": false, 44 | "acceptFileTypes": ".pdf", 45 | "requiredField": true 46 | } 47 | ] 48 | }, 49 | "options": { 50 | "appendAttribution": false, 51 | "buttonLabel": "Kirim Lamaran", 52 | "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #fbfcfe;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #ffffff;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #555555;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #0000FF;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}" 53 | } 54 | }, 55 | "type": "n8n-nodes-base.formTrigger", 56 | "typeVersion": 2.2, 57 | "position": [ 58 | 0, 59 | 0 60 | ], 61 | "id": "a3cd20c8-a4c4-4eae-8809-115b3a8d4fdd", 62 | "name": "On form submission", 63 | "webhookId": "65887e89-8113-4934-b500-17c495abaa56" 64 | }, 65 | { 66 | "parameters": { 67 | "promptType": "define", 68 | "text": "=Isian Form :\nNama Lengkap : {{ $('On form submission').item.json['Nama Lengkap'] }}\nTanggal Lahir : {{ $('On form submission').item.json['Tanggal Lahir'] }}\n\nIsi CV PDF :\n{{ $('Extract PDF').item.json.text }}\n\n# Requirement Posisi\nUsia Minimal : {{ $json['Min Age'] }}\nUsia Maximal : {{ $json['Max Age'] }}\nMinimal Tahun Pengalaman Kerja : {{ $json['Min YoE'] }}\nPendidikan Minimal : {{ $json['Min Education'] }}\nRequired Skill : {{ $json['Required Skill'] }}", 69 | "hasOutputParser": true, 70 | "options": { 71 | "systemMessage": "=Hari ini adalah tanggal {{ $now.format('yyyy-MM-dd') }}.\n\nKamu adalah seorang staff HR yang bertugas untuk memfilter dan memberikan penilaian awal terhadap lamaran masuk dan harus kamu bandingkan dengan posisi yang tersedia di perusahaan dengan cara menganalisa isi CV yang dikirimkan.\n\nOutput yang harus kamu berikan :\n\n- Nama Lengkap\n- Tanggal Lahir\n- Usia Per Hari Ini (Tahun, Bulan, Hari)\n- Kecocokan Usia Dalam Persentase (Berdasarkan Usia Minimum dan Maksimum)\n- Kecocokan Status Pendidikan Dalam Persentase (Kalau strata pendidikan diatas batas minimal, maka 100%, kalau dibawah batas minimal, semakin jauh, semakin kecil persentasenya)\n- Kecocokan tahun pengalaman kerja dalam persentase,\n- Kecocokan skill yang dibutuhkan dalam persentase.\n\nContoh output :\n\n{\n \"fullname\": \"\",\n \"dob\": \"\",\n \"age\": \"\",\n \"vacancy_min_age\": \"\",\n \"vacancy_max_age\": \"\",\n \"age_percentage\": \"\",\n \"education_level\": \"\",\n \"vacancy_education_level\": \"\",\n \"education_percentage\": \"\",\n \"yoe\": \"\",\n \"vacancy_yoe\": \"\",\n \"yoe_percentage\": \"\",\n \"vacancy_skills\": \"\",\n \"skill_percentage\": \"\",\n \"average_percentage\": \"\"\n}\n\n# PENTING\n- JANGAN PERNAH berhalusinasi soal data. Pastikan data yang kamu hitung valid.", 72 | "passthroughBinaryImages": true 73 | } 74 | }, 75 | "type": "@n8n/n8n-nodes-langchain.agent", 76 | "typeVersion": 2, 77 | "position": [ 78 | 780, 79 | 0 80 | ], 81 | "id": "add1d97c-47d1-4b14-855d-f71cc8f7b441", 82 | "name": "AI Agent" 83 | }, 84 | { 85 | "parameters": { 86 | "model": { 87 | "__rl": true, 88 | "value": "gpt-4.1", 89 | "mode": "list", 90 | "cachedResultName": "gpt-4.1" 91 | }, 92 | "options": {} 93 | }, 94 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 95 | "typeVersion": 1.2, 96 | "position": [ 97 | 680, 98 | 260 99 | ], 100 | "id": "5ae4a79f-4f10-409e-8c14-2af88240a0dd", 101 | "name": "OpenAI Chat Model", 102 | "credentials": { 103 | "openAiApi": { 104 | "id": "y8sLJ2LzZL2c7SGi", 105 | "name": "OpenAI Webinar" 106 | } 107 | } 108 | }, 109 | { 110 | "parameters": { 111 | "documentId": { 112 | "__rl": true, 113 | "value": "1buT5kZNGGwjCYfgBt1LrVbwz66q45R6tQoMUQqguk5w", 114 | "mode": "list", 115 | "cachedResultName": "AI HR", 116 | "cachedResultUrl": "https://docs.google.com/" 117 | }, 118 | "sheetName": { 119 | "__rl": true, 120 | "value": "gid=0", 121 | "mode": "list", 122 | "cachedResultName": "Vacancy", 123 | "cachedResultUrl": "https://docs.google.com/" 124 | }, 125 | "filtersUI": { 126 | "values": [ 127 | { 128 | "lookupColumn": "Position", 129 | "lookupValue": "={{ $('On form submission').item.json['Posisi Yang Dilamar'] }}" 130 | } 131 | ] 132 | }, 133 | "options": {} 134 | }, 135 | "type": "n8n-nodes-base.googleSheets", 136 | "typeVersion": 4.6, 137 | "position": [ 138 | 500, 139 | 0 140 | ], 141 | "id": "872554ae-6c89-4cf0-928f-03478cb9fc68", 142 | "name": "Get Vacancy", 143 | "credentials": { 144 | "googleSheetsOAuth2Api": { 145 | "id": "qKBvcP6SqTA7vqHl", 146 | "name": "Google Sheets account 3" 147 | } 148 | } 149 | }, 150 | { 151 | "parameters": { 152 | "operation": "pdf", 153 | "binaryPropertyName": "Upload_CV___pdf_", 154 | "options": {} 155 | }, 156 | "type": "n8n-nodes-base.extractFromFile", 157 | "typeVersion": 1, 158 | "position": [ 159 | 260, 160 | 0 161 | ], 162 | "id": "73ec3a99-3f1c-4bbd-a84c-fbf5c2384b23", 163 | "name": "Extract PDF" 164 | }, 165 | { 166 | "parameters": { 167 | "jsonSchemaExample": "{\n \"fullname\": \"\",\n \"dob\": \"\",\n \"age\": \"\",\n \"vacancy_min_age\": \"\",\n \"vacancy_max_age\": \"\",\n \"age_percentage\": \"\",\n \"education_level\": \"\",\n \"vacancy_education_level\": \"\",\n \"education_percentage\": \"\",\n \"yoe\": \"\",\n \"vacancy_yoe\": \"\",\n \"yoe_percentage\": \"\",\n \"vacancy_skills\": \"\",\n \"skill_percentage\": \"\",\n \"average_percentage\": \"\"\n}" 168 | }, 169 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 170 | "typeVersion": 1.3, 171 | "position": [ 172 | 1000, 173 | 260 174 | ], 175 | "id": "1f4f00f3-c643-46e8-ba67-92574a76b6da", 176 | "name": "Structured Output Parser" 177 | }, 178 | { 179 | "parameters": { 180 | "operation": "append", 181 | "documentId": { 182 | "__rl": true, 183 | "value": "1buT5kZNGGwjCYfgBt1LrVbwz66q45R6tQoMUQqguk5w", 184 | "mode": "list", 185 | "cachedResultName": "AI HR", 186 | "cachedResultUrl": "https://docs.google.com/" 187 | }, 188 | "sheetName": { 189 | "__rl": true, 190 | "value": 180424369, 191 | "mode": "list", 192 | "cachedResultName": "Applicant", 193 | "cachedResultUrl": "https://docs.google.com/" 194 | }, 195 | "columns": { 196 | "mappingMode": "defineBelow", 197 | "value": { 198 | "Fullname": "={{ $json.output.fullname }}", 199 | "DoB": "={{ $json.output.dob }}", 200 | "Age": "={{ $json.output.age }}", 201 | "Vacancy Min Age": "={{ $json.output.vacancy_min_age }}", 202 | "Vacancy Max Age": "={{ $json.output.vacancy_max_age }}", 203 | "Age Percentage": "={{ $json.output.age_percentage }}", 204 | "Education Level": "={{ $json.output.education_level }}", 205 | "Vacancy Education Level": "={{ $json.output.vacancy_education_level }}", 206 | "Education Percentage": "={{ $json.output.education_percentage }}", 207 | "YoE": "={{ $json.output.yoe }}", 208 | "YoE Percentage": "={{ $json.output.yoe_percentage }}", 209 | "Vacancy YoE": "={{ $json.output.vacancy_yoe }}", 210 | "Skills": "={{ $json.output.skills }}", 211 | "Vacancy Skills": "={{ $json.output.vacancy_skills }}", 212 | "Skill Percentage": "={{ $json.output.skill_percentage }}", 213 | "Average Percentage": "={{ $json.output.average_percentage }}" 214 | }, 215 | "matchingColumns": [], 216 | "schema": [ 217 | { 218 | "id": "Fullname", 219 | "displayName": "Fullname", 220 | "required": false, 221 | "defaultMatch": false, 222 | "display": true, 223 | "type": "string", 224 | "canBeUsedToMatch": true 225 | }, 226 | { 227 | "id": "DoB", 228 | "displayName": "DoB", 229 | "required": false, 230 | "defaultMatch": false, 231 | "display": true, 232 | "type": "string", 233 | "canBeUsedToMatch": true 234 | }, 235 | { 236 | "id": "Age", 237 | "displayName": "Age", 238 | "required": false, 239 | "defaultMatch": false, 240 | "display": true, 241 | "type": "string", 242 | "canBeUsedToMatch": true 243 | }, 244 | { 245 | "id": "Vacancy Min Age", 246 | "displayName": "Vacancy Min Age", 247 | "required": false, 248 | "defaultMatch": false, 249 | "display": true, 250 | "type": "string", 251 | "canBeUsedToMatch": true 252 | }, 253 | { 254 | "id": "Vacancy Max Age", 255 | "displayName": "Vacancy Max Age", 256 | "required": false, 257 | "defaultMatch": false, 258 | "display": true, 259 | "type": "string", 260 | "canBeUsedToMatch": true 261 | }, 262 | { 263 | "id": "Age Percentage", 264 | "displayName": "Age Percentage", 265 | "required": false, 266 | "defaultMatch": false, 267 | "display": true, 268 | "type": "string", 269 | "canBeUsedToMatch": true 270 | }, 271 | { 272 | "id": "Education Level", 273 | "displayName": "Education Level", 274 | "required": false, 275 | "defaultMatch": false, 276 | "display": true, 277 | "type": "string", 278 | "canBeUsedToMatch": true 279 | }, 280 | { 281 | "id": "Vacancy Education Level", 282 | "displayName": "Vacancy Education Level", 283 | "required": false, 284 | "defaultMatch": false, 285 | "display": true, 286 | "type": "string", 287 | "canBeUsedToMatch": true 288 | }, 289 | { 290 | "id": "Education Percentage", 291 | "displayName": "Education Percentage", 292 | "required": false, 293 | "defaultMatch": false, 294 | "display": true, 295 | "type": "string", 296 | "canBeUsedToMatch": true 297 | }, 298 | { 299 | "id": "YoE", 300 | "displayName": "YoE", 301 | "required": false, 302 | "defaultMatch": false, 303 | "display": true, 304 | "type": "string", 305 | "canBeUsedToMatch": true 306 | }, 307 | { 308 | "id": "Vacancy YoE", 309 | "displayName": "Vacancy YoE", 310 | "required": false, 311 | "defaultMatch": false, 312 | "display": true, 313 | "type": "string", 314 | "canBeUsedToMatch": true 315 | }, 316 | { 317 | "id": "YoE Percentage", 318 | "displayName": "YoE Percentage", 319 | "required": false, 320 | "defaultMatch": false, 321 | "display": true, 322 | "type": "string", 323 | "canBeUsedToMatch": true 324 | }, 325 | { 326 | "id": "Skills", 327 | "displayName": "Skills", 328 | "required": false, 329 | "defaultMatch": false, 330 | "display": true, 331 | "type": "string", 332 | "canBeUsedToMatch": true 333 | }, 334 | { 335 | "id": "Vacancy Skills", 336 | "displayName": "Vacancy Skills", 337 | "required": false, 338 | "defaultMatch": false, 339 | "display": true, 340 | "type": "string", 341 | "canBeUsedToMatch": true 342 | }, 343 | { 344 | "id": "Skill Percentage", 345 | "displayName": "Skill Percentage", 346 | "required": false, 347 | "defaultMatch": false, 348 | "display": true, 349 | "type": "string", 350 | "canBeUsedToMatch": true 351 | }, 352 | { 353 | "id": "Average Percentage", 354 | "displayName": "Average Percentage", 355 | "required": false, 356 | "defaultMatch": false, 357 | "display": true, 358 | "type": "string", 359 | "canBeUsedToMatch": true 360 | } 361 | ], 362 | "attemptToConvertTypes": false, 363 | "convertFieldsToString": false 364 | }, 365 | "options": {} 366 | }, 367 | "type": "n8n-nodes-base.googleSheets", 368 | "typeVersion": 4.6, 369 | "position": [ 370 | 1140, 371 | 0 372 | ], 373 | "id": "e5aa6629-ec6c-4b03-a10e-ff1357ef6d2c", 374 | "name": "Save Applicant", 375 | "credentials": { 376 | "googleSheetsOAuth2Api": { 377 | "id": "qKBvcP6SqTA7vqHl", 378 | "name": "Google Sheets account 3" 379 | } 380 | } 381 | } 382 | ], 383 | "pinData": {}, 384 | "connections": { 385 | "On form submission": { 386 | "main": [ 387 | [ 388 | { 389 | "node": "Extract PDF", 390 | "type": "main", 391 | "index": 0 392 | } 393 | ] 394 | ] 395 | }, 396 | "OpenAI Chat Model": { 397 | "ai_languageModel": [ 398 | [ 399 | { 400 | "node": "AI Agent", 401 | "type": "ai_languageModel", 402 | "index": 0 403 | } 404 | ] 405 | ] 406 | }, 407 | "Get Vacancy": { 408 | "main": [ 409 | [ 410 | { 411 | "node": "AI Agent", 412 | "type": "main", 413 | "index": 0 414 | } 415 | ] 416 | ] 417 | }, 418 | "Extract PDF": { 419 | "main": [ 420 | [ 421 | { 422 | "node": "Get Vacancy", 423 | "type": "main", 424 | "index": 0 425 | } 426 | ] 427 | ] 428 | }, 429 | "Structured Output Parser": { 430 | "ai_outputParser": [ 431 | [ 432 | { 433 | "node": "AI Agent", 434 | "type": "ai_outputParser", 435 | "index": 0 436 | } 437 | ] 438 | ] 439 | }, 440 | "AI Agent": { 441 | "main": [ 442 | [ 443 | { 444 | "node": "Save Applicant", 445 | "type": "main", 446 | "index": 0 447 | } 448 | ] 449 | ] 450 | }, 451 | "Save Applicant": { 452 | "main": [ 453 | [] 454 | ] 455 | } 456 | }, 457 | "active": false, 458 | "settings": { 459 | "executionOrder": "v1" 460 | }, 461 | "versionId": "f3bd384e-cd46-43e6-bce3-cbc484227cac", 462 | "meta": { 463 | "templateCredsSetupCompleted": true, 464 | "instanceId": "fa52a98dd39f67760c7540fff8a0dd5306d89f766551eb7a7c84b5f43eb33d4c" 465 | }, 466 | "id": "2LEk0uAxPLc8aFwP", 467 | "tags": [] 468 | } -------------------------------------------------------------------------------- /ssh-ai-agent.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SSH AI Agent - Telegram Version", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "conditions": { 7 | "options": { 8 | "caseSensitive": true, 9 | "leftValue": "", 10 | "typeValidation": "strict", 11 | "version": 2 12 | }, 13 | "conditions": [ 14 | { 15 | "id": "66ea69df-9598-44ba-a0b6-ddf28093864b", 16 | "leftValue": "={{ $json.data.approved }}", 17 | "rightValue": "", 18 | "operator": { 19 | "type": "boolean", 20 | "operation": "true", 21 | "singleValue": true 22 | } 23 | } 24 | ], 25 | "combinator": "and" 26 | }, 27 | "options": {} 28 | }, 29 | "type": "n8n-nodes-base.if", 30 | "typeVersion": 2.2, 31 | "position": [ 32 | 1300, 33 | 80 34 | ], 35 | "id": "0443bc72-da10-4814-8300-f0683a419ee4", 36 | "name": "If Approved" 37 | }, 38 | { 39 | "parameters": { 40 | "rules": { 41 | "values": [ 42 | { 43 | "conditions": { 44 | "options": { 45 | "caseSensitive": true, 46 | "leftValue": "", 47 | "typeValidation": "strict", 48 | "version": 2 49 | }, 50 | "conditions": [ 51 | { 52 | "leftValue": "={{ $('Sysadmin AI Agent').item.json.output.server }}", 53 | "rightValue": "VPS-FE", 54 | "operator": { 55 | "type": "string", 56 | "operation": "equals" 57 | }, 58 | "id": "8c467ebb-5564-4399-9bdb-d844eb252264" 59 | } 60 | ], 61 | "combinator": "and" 62 | } 63 | }, 64 | { 65 | "conditions": { 66 | "options": { 67 | "caseSensitive": true, 68 | "leftValue": "", 69 | "typeValidation": "strict", 70 | "version": 2 71 | }, 72 | "conditions": [ 73 | { 74 | "id": "7e0643e4-f707-4e93-bf96-e0cf5a516673", 75 | "leftValue": "={{ $('Sysadmin AI Agent').item.json.output.server }}", 76 | "rightValue": "VPS-BE", 77 | "operator": { 78 | "type": "string", 79 | "operation": "equals", 80 | "name": "filter.operator.equals" 81 | } 82 | } 83 | ], 84 | "combinator": "and" 85 | } 86 | }, 87 | { 88 | "conditions": { 89 | "options": { 90 | "caseSensitive": true, 91 | "leftValue": "", 92 | "typeValidation": "strict", 93 | "version": 2 94 | }, 95 | "conditions": [ 96 | { 97 | "id": "42cf33c7-cb36-42ef-8b1e-6e4b74f2a609", 98 | "leftValue": "={{ $('Sysadmin AI Agent').item.json.output.server }}", 99 | "rightValue": "VPS-PROXY", 100 | "operator": { 101 | "type": "string", 102 | "operation": "equals", 103 | "name": "filter.operator.equals" 104 | } 105 | } 106 | ], 107 | "combinator": "and" 108 | } 109 | } 110 | ] 111 | }, 112 | "options": {} 113 | }, 114 | "type": "n8n-nodes-base.switch", 115 | "typeVersion": 3.2, 116 | "position": [ 117 | 1820, 118 | 80 119 | ], 120 | "id": "60c689be-6497-4b8d-9591-5f7573cf2fda", 121 | "name": "Switch" 122 | }, 123 | { 124 | "parameters": { 125 | "sessionIdType": "customKey", 126 | "sessionKey": "={{ $('Telegram Trigger').item.json.message.from.id }}" 127 | }, 128 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 129 | "typeVersion": 1.3, 130 | "position": [ 131 | -260, 132 | 160 133 | ], 134 | "id": "c99169ab-b0eb-449c-ad4d-bed4bf7e4de2", 135 | "name": "Simple Memory" 136 | }, 137 | { 138 | "parameters": { 139 | "jsonSchemaExample": "{\n\t\"server\": \"VPS-DEV\",\n\t\"command\": \"sudo su\",\n \"explanation\": \"Explanation of sudo su\",\n \"workingDirectory\": \"/working-directory\",\n \"type\": \"COMMAND or DISCUSSION\",\n \"discussion\": \"Think to discuss\"\n}" 140 | }, 141 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 142 | "typeVersion": 1.2, 143 | "position": [ 144 | 40, 145 | 160 146 | ], 147 | "id": "2567d0f5-dd1c-47cc-a9ad-72c61e99788b", 148 | "name": "Structured Output Parser" 149 | }, 150 | { 151 | "parameters": { 152 | "rules": { 153 | "values": [ 154 | { 155 | "conditions": { 156 | "options": { 157 | "caseSensitive": true, 158 | "leftValue": "", 159 | "typeValidation": "strict", 160 | "version": 2 161 | }, 162 | "conditions": [ 163 | { 164 | "leftValue": "={{ $json.output.type.toUpperCase() }}", 165 | "rightValue": "DISCUSSION", 166 | "operator": { 167 | "type": "string", 168 | "operation": "equals" 169 | }, 170 | "id": "94b10c02-0695-4460-8a3e-0d6ed327148a" 171 | } 172 | ], 173 | "combinator": "and" 174 | } 175 | }, 176 | { 177 | "conditions": { 178 | "options": { 179 | "caseSensitive": true, 180 | "leftValue": "", 181 | "typeValidation": "strict", 182 | "version": 2 183 | }, 184 | "conditions": [ 185 | { 186 | "id": "187412fd-8918-4a28-bdeb-72afdddfa264", 187 | "leftValue": "={{ $json.output.type.toUpperCase() }}", 188 | "rightValue": "COMMAND", 189 | "operator": { 190 | "type": "string", 191 | "operation": "equals", 192 | "name": "filter.operator.equals" 193 | } 194 | } 195 | ], 196 | "combinator": "and" 197 | } 198 | } 199 | ] 200 | }, 201 | "options": {} 202 | }, 203 | "type": "n8n-nodes-base.switch", 204 | "typeVersion": 3.2, 205 | "position": [ 206 | 340, 207 | 220 208 | ], 209 | "id": "aa15c1e0-7e02-4694-81d5-a3f0ce2688b3", 210 | "name": "COMMAND or DISCUSSION" 211 | }, 212 | { 213 | "parameters": {}, 214 | "type": "n8n-nodes-base.merge", 215 | "typeVersion": 3.1, 216 | "position": [ 217 | 2920, 218 | 100 219 | ], 220 | "id": "c72a8779-aeee-45b4-8626-c402a9565a14", 221 | "name": "Merge" 222 | }, 223 | { 224 | "parameters": { 225 | "promptType": "define", 226 | "text": "={{ $json.command }}", 227 | "hasOutputParser": true, 228 | "options": { 229 | "systemMessage": "=Waktu saat ini adalah {{ $now.format('yyyy-MM-dd HH:mm:ss') }}\n\nKamu adalah seorang system administrator handal dengan pengalaman lebih dari 15 tahun yang bertugas mengelola server via SSH. \n\nSetiap kali menerima permintaan dari user, ikuti langkah ini:\n\n1. Plan: Gunakan 'SysadminThinkTool' untuk memetakan langkah—apa yang perlu dicek, diperbarui, atau dijalankan. \n2. Respond: Langsung keluarkan hasil dengan format JSON-like berikut (tanpa memanggil tool apa pun):\n - 'type': '\"COMMAND\"' jika Anda akan mengeksekusi perintah, atau '\"DISCUSSION\"' jika Anda butuh klarifikasi/diskusi dulu. \n - 'command': string — perintah shell yang akan dijalankan (kosong jika 'type' = '\"DISCUSSION\"'). \n - 'workingDirectory': string — direktori kerja tempat perintah dijalankan (kosong jika 'type' = '\"DISCUSSION\"'). \n - 'server': string — identifier server (contoh: '\"VPS-DEV\"', '\"VPS-APP01\"', dst.), bukan deskripsi (“Server VPS Development”). Kosong jika 'type' = '\"DISCUSSION\"'. \n - 'explanation': string — ringkasan singkat fungsi perintah ini (boleh kosong jika 'type' = '\"DISCUSSION\"'). \n - 'discussion': string — pertanyaan atau poin diskusi untuk user (isi hanya jika 'type' = '\"DISCUSSION\"').\n\n3. Daftar server yang valid:\n - 'VPS-FE' : Server VPS Frontend dengan IP 103.245.38.239\n - 'VPS-BE' : Server VPS Backend dengan IP 103.245.39.22\n - 'VPS-PROXY' : Server VPS Proxy dengan IP 103.16.117.102\n\n4. Gaya bahasa: santai, lugas, dan tidak kaku seperti robot.\n\n---\n\nContoh \nSysadminThinkTool:\n\nCek status disk space\n\nKonfirmasi direktori backup\n\nResponse:\n{\n\"type\": \"DISCUSSION\",\n\"command\": \"\",\n\"workingDirectory\": \"\",\n\"server\": \"\",\n\"explanation\": \"\",\n\"discussion\": \"Apakah Anda ingin menjalankan backup di /var/backups sekarang atau menunggu setelah jam sibuk?\"\n}" 230 | } 231 | }, 232 | "type": "@n8n/n8n-nodes-langchain.agent", 233 | "typeVersion": 1.9, 234 | "position": [ 235 | -280, 236 | -80 237 | ], 238 | "id": "c95eb346-cee0-455f-bc1c-ce373ddd884b", 239 | "name": "Sysadmin AI Agent", 240 | "onError": "continueErrorOutput" 241 | }, 242 | { 243 | "parameters": { 244 | "model": { 245 | "__rl": true, 246 | "value": "gpt-4.1", 247 | "mode": "list", 248 | "cachedResultName": "gpt-4.1" 249 | }, 250 | "options": {} 251 | }, 252 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 253 | "typeVersion": 1.2, 254 | "position": [ 255 | -400, 256 | 160 257 | ], 258 | "id": "010807a9-2977-4434-b34c-fa0e97125f0c", 259 | "name": "Sysadmin Model", 260 | "credentials": { 261 | "openAiApi": { 262 | "id": "KJPhnHT5PPdHb1Bl", 263 | "name": "OpenAI - Aji Prakoso" 264 | } 265 | } 266 | }, 267 | { 268 | "parameters": { 269 | "resource": "audio", 270 | "operation": "transcribe", 271 | "options": {} 272 | }, 273 | "type": "@n8n/n8n-nodes-langchain.openAi", 274 | "typeVersion": 1.8, 275 | "position": [ 276 | -1400, 277 | -260 278 | ], 279 | "id": "27d20adf-ff28-4513-b15a-4f1c7aa074f0", 280 | "name": "OpenAI", 281 | "credentials": { 282 | "openAiApi": { 283 | "id": "KJPhnHT5PPdHb1Bl", 284 | "name": "OpenAI - Aji Prakoso" 285 | } 286 | } 287 | }, 288 | { 289 | "parameters": { 290 | "assignments": { 291 | "assignments": [ 292 | { 293 | "id": "599a59ba-4f43-4a1b-93c7-e8addf1ce1c6", 294 | "name": "command", 295 | "value": "={{ $json.text }}", 296 | "type": "string" 297 | } 298 | ] 299 | }, 300 | "options": {} 301 | }, 302 | "type": "n8n-nodes-base.set", 303 | "typeVersion": 3.4, 304 | "position": [ 305 | -1100, 306 | -260 307 | ], 308 | "id": "3c1081ad-4078-4cfa-bcb3-2d6e96d99535", 309 | "name": "Audio Mapper" 310 | }, 311 | { 312 | "parameters": {}, 313 | "type": "n8n-nodes-base.merge", 314 | "typeVersion": 3.1, 315 | "position": [ 316 | -700, 317 | -80 318 | ], 319 | "id": "f3ab088d-a21e-4f98-b90a-6b8b4ae8e5fc", 320 | "name": "Data Merge" 321 | }, 322 | { 323 | "parameters": { 324 | "assignments": { 325 | "assignments": [ 326 | { 327 | "id": "0c9881a1-6a51-40fa-8327-c1b142e706c1", 328 | "name": "command", 329 | "value": "={{ $json.message.text }}", 330 | "type": "string" 331 | } 332 | ] 333 | }, 334 | "options": {} 335 | }, 336 | "type": "n8n-nodes-base.set", 337 | "typeVersion": 3.4, 338 | "position": [ 339 | -1100, 340 | 20 341 | ], 342 | "id": "2e600bb3-6a6e-4b0e-95f7-813548bf6de8", 343 | "name": "Edit Fields" 344 | }, 345 | { 346 | "parameters": { 347 | "content": "## Inbound Chat Receiver", 348 | "height": 240, 349 | "width": 360, 350 | "color": 4 351 | }, 352 | "type": "n8n-nodes-base.stickyNote", 353 | "position": [ 354 | -2920, 355 | -180 356 | ], 357 | "typeVersion": 1, 358 | "id": "1fbaa528-b60e-4b78-a9ac-8997e6c1c4aa", 359 | "name": "Sticky Note" 360 | }, 361 | { 362 | "parameters": { 363 | "content": "## Message Type Switcher\nAudio or Text", 364 | "height": 240, 365 | "width": 360, 366 | "color": 5 367 | }, 368 | "type": "n8n-nodes-base.stickyNote", 369 | "position": [ 370 | -2160, 371 | -300 372 | ], 373 | "typeVersion": 1, 374 | "id": "f1e407bc-5880-4e36-85c5-7523558c80f8", 375 | "name": "Sticky Note1" 376 | }, 377 | { 378 | "parameters": { 379 | "content": "## Audio Chat Processor - Transcribe using OpenAI Speech-to-Text", 380 | "height": 300, 381 | "width": 920, 382 | "color": 6 383 | }, 384 | "type": "n8n-nodes-base.stickyNote", 385 | "position": [ 386 | -1780, 387 | -360 388 | ], 389 | "typeVersion": 1, 390 | "id": "0bba8e6d-48cf-45b5-a306-b368fb84b851", 391 | "name": "Sticky Note2" 392 | }, 393 | { 394 | "parameters": { 395 | "content": "## Text Chat Processor", 396 | "height": 300, 397 | "width": 920, 398 | "color": 6 399 | }, 400 | "type": "n8n-nodes-base.stickyNote", 401 | "position": [ 402 | -1780, 403 | -40 404 | ], 405 | "typeVersion": 1, 406 | "id": "6e7207c2-d85d-432c-9877-2a925d16b1b7", 407 | "name": "Sticky Note3" 408 | }, 409 | { 410 | "parameters": { 411 | "content": "## Merge the Data to Text", 412 | "height": 240, 413 | "width": 360, 414 | "color": 5 415 | }, 416 | "type": "n8n-nodes-base.stickyNote", 417 | "position": [ 418 | -820, 419 | -160 420 | ], 421 | "typeVersion": 1, 422 | "id": "a86b0034-6c0d-40fc-a973-59b3d7a1f8de", 423 | "name": "Sticky Note4" 424 | }, 425 | { 426 | "parameters": { 427 | "content": "## Sysadmin AI Agent 🧠 ", 428 | "height": 480, 429 | "width": 600, 430 | "color": 3 431 | }, 432 | "type": "n8n-nodes-base.stickyNote", 433 | "position": [ 434 | -440, 435 | -160 436 | ], 437 | "typeVersion": 1, 438 | "id": "4513fe3c-8789-4342-b46a-564e967f78fd", 439 | "name": "Sticky Note5" 440 | }, 441 | { 442 | "parameters": { 443 | "content": "## Command or Discussion ?", 444 | "height": 300, 445 | "width": 420, 446 | "color": 5 447 | }, 448 | "type": "n8n-nodes-base.stickyNote", 449 | "position": [ 450 | 180, 451 | 120 452 | ], 453 | "typeVersion": 1, 454 | "id": "a4487742-e9be-41d7-8c27-d02aa81592f3", 455 | "name": "Sticky Note6" 456 | }, 457 | { 458 | "parameters": { 459 | "content": "## Reply Discussion", 460 | "height": 320, 461 | "width": 480, 462 | "color": 2 463 | }, 464 | "type": "n8n-nodes-base.stickyNote", 465 | "position": [ 466 | 620, 467 | -40 468 | ], 469 | "typeVersion": 1, 470 | "id": "adc95527-402b-46ed-a4a8-119cde9fe960", 471 | "name": "Sticky Note7" 472 | }, 473 | { 474 | "parameters": { 475 | "content": "## Waiting for User to Approve Command", 476 | "height": 320, 477 | "width": 480, 478 | "color": 2 479 | }, 480 | "type": "n8n-nodes-base.stickyNote", 481 | "position": [ 482 | 620, 483 | 300 484 | ], 485 | "typeVersion": 1, 486 | "id": "5a14eb13-6e77-4148-83e4-f01cd0eecc84", 487 | "name": "Sticky Note8" 488 | }, 489 | { 490 | "parameters": { 491 | "content": "## Reject or Approve ?", 492 | "height": 320, 493 | "width": 480, 494 | "color": 5 495 | }, 496 | "type": "n8n-nodes-base.stickyNote", 497 | "position": [ 498 | 1120, 499 | -40 500 | ], 501 | "typeVersion": 1, 502 | "id": "7ebaea5f-6b38-4bad-9890-dea6f8c01d87", 503 | "name": "Sticky Note9" 504 | }, 505 | { 506 | "parameters": { 507 | "content": "## Send Reject Confirmation", 508 | "height": 320, 509 | "width": 480, 510 | "color": 3 511 | }, 512 | "type": "n8n-nodes-base.stickyNote", 513 | "position": [ 514 | 1120, 515 | 300 516 | ], 517 | "typeVersion": 1, 518 | "id": "7ca38d74-7251-4362-be50-c0c7e20a30a5", 519 | "name": "Sticky Note10" 520 | }, 521 | { 522 | "parameters": { 523 | "content": "## Server Identifier Switcher", 524 | "height": 320, 525 | "width": 480, 526 | "color": 5 527 | }, 528 | "type": "n8n-nodes-base.stickyNote", 529 | "position": [ 530 | 1620, 531 | -40 532 | ], 533 | "typeVersion": 1, 534 | "id": "34384edd-ea0f-43a4-b259-3b40afbed1c7", 535 | "name": "Sticky Note11" 536 | }, 537 | { 538 | "parameters": { 539 | "command": "={{ $('COMMAND or DISCUSSION').item.json.output.command }}", 540 | "cwd": "={{ ($('COMMAND or DISCUSSION').item.json.output.workingDirectory || '/').replaceAll('~', '/') }}" 541 | }, 542 | "type": "n8n-nodes-base.ssh", 543 | "typeVersion": 1, 544 | "position": [ 545 | 2340, 546 | -200 547 | ], 548 | "id": "e3d2a37f-9b79-4034-b2c6-9ce3baf8eff5", 549 | "name": "SSH - FE", 550 | "credentials": { 551 | "sshPassword": { 552 | "id": "fd6cwCFBwwDetamL", 553 | "name": "SSH - JH - 103.245.38.239 - FE" 554 | } 555 | } 556 | }, 557 | { 558 | "parameters": { 559 | "promptType": "define", 560 | "text": "={{ JSON.stringify($json) }}", 561 | "options": { 562 | "systemMessage": "=Kamu adalah seorang system administrator paling handal sedunia! Kamu harus bisa menjelaskan apa maksud dari output perintah SSH yang dikirimkan oleh user. User baru saja mengirimkan perintah \"{{ $('COMMAND or DISCUSSION').item.json.output.command }}\" di directory \"{{ $('COMMAND or DISCUSSION').item.json.output.workingDirectory || '/' }}\" melalui SSH.\n\nGunakan tool \"SysadminThinkTool\" untuk berfikir dan menyusun jawaban kepada user.\n\nJelaskan secara singkat dan padat dan tidak usah mencantumkan json output, supaya lebih enak dibaca di chat." 563 | } 564 | }, 565 | "type": "@n8n/n8n-nodes-langchain.agent", 566 | "typeVersion": 1.9, 567 | "position": [ 568 | 3320, 569 | 100 570 | ], 571 | "id": "88b46323-c662-4458-a9ff-98e6d26aad0c", 572 | "name": "Explainer AI Agent" 573 | }, 574 | { 575 | "parameters": { 576 | "model": { 577 | "__rl": true, 578 | "value": "gpt-4.1-mini", 579 | "mode": "list", 580 | "cachedResultName": "gpt-4.1-mini" 581 | }, 582 | "options": {} 583 | }, 584 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 585 | "typeVersion": 1.2, 586 | "position": [ 587 | 3300, 588 | 360 589 | ], 590 | "id": "a19cf4da-d42b-4708-9284-57140fee352e", 591 | "name": "Explainer Model", 592 | "credentials": { 593 | "openAiApi": { 594 | "id": "KJPhnHT5PPdHb1Bl", 595 | "name": "OpenAI - Aji Prakoso" 596 | } 597 | } 598 | }, 599 | { 600 | "parameters": { 601 | "command": "={{ $('COMMAND or DISCUSSION').item.json.output.command }}", 602 | "cwd": "={{ ($('COMMAND or DISCUSSION').item.json.output.workingDirectory || '/').replaceAll('~', '/') }}" 603 | }, 604 | "type": "n8n-nodes-base.ssh", 605 | "typeVersion": 1, 606 | "position": [ 607 | 2340, 608 | 60 609 | ], 610 | "id": "5de685e3-3d58-4b7f-bf68-6471dc983df4", 611 | "name": "SSH - BE", 612 | "credentials": { 613 | "sshPassword": { 614 | "id": "jrJcSHaEJwucIUcx", 615 | "name": "SSH - JH - 103.245.39.22 - BE" 616 | } 617 | } 618 | }, 619 | { 620 | "parameters": { 621 | "command": "={{ $('COMMAND or DISCUSSION').item.json.output.command }}", 622 | "cwd": "={{ ($('COMMAND or DISCUSSION').item.json.output.workingDirectory || '/').replaceAll('~', '/') }}" 623 | }, 624 | "type": "n8n-nodes-base.ssh", 625 | "typeVersion": 1, 626 | "position": [ 627 | 2340, 628 | 320 629 | ], 630 | "id": "cf9caf2f-5ece-4cfa-968c-891fecb6dcf7", 631 | "name": "SSH - PROXY", 632 | "credentials": { 633 | "sshPassword": { 634 | "id": "JHufmzQhPinFxYof", 635 | "name": "SSH - JH - 103.16.117.102 - PROXY" 636 | } 637 | } 638 | }, 639 | { 640 | "parameters": { 641 | "content": "## Server Access List", 642 | "height": 840, 643 | "width": 560, 644 | "color": 6 645 | }, 646 | "type": "n8n-nodes-base.stickyNote", 647 | "position": [ 648 | 2120, 649 | -300 650 | ], 651 | "typeVersion": 1, 652 | "id": "30e72f3b-4fa8-4b0d-8a4a-2780c4458876", 653 | "name": "Sticky Note12" 654 | }, 655 | { 656 | "parameters": {}, 657 | "type": "@n8n/n8n-nodes-langchain.toolThink", 658 | "typeVersion": 1, 659 | "position": [ 660 | -120, 661 | 160 662 | ], 663 | "id": "e83f172c-22b4-4157-b95a-4ac0a1e2220e", 664 | "name": "SysadminThinkTool" 665 | }, 666 | { 667 | "parameters": {}, 668 | "type": "@n8n/n8n-nodes-langchain.toolThink", 669 | "typeVersion": 1, 670 | "position": [ 671 | 3500, 672 | 360 673 | ], 674 | "id": "75683bc4-dcc7-492c-8c4c-d401b7c81ad1", 675 | "name": "ExplainerThinkTool" 676 | }, 677 | { 678 | "parameters": { 679 | "content": "## Merge the Data", 680 | "height": 320, 681 | "width": 480, 682 | "color": 7 683 | }, 684 | "type": "n8n-nodes-base.stickyNote", 685 | "position": [ 686 | 2700, 687 | 0 688 | ], 689 | "typeVersion": 1, 690 | "id": "4d37f739-e12d-42d1-a192-91e996d865c1", 691 | "name": "Sticky Note13" 692 | }, 693 | { 694 | "parameters": { 695 | "content": "## Explain the Output from SSH", 696 | "height": 540, 697 | "width": 480, 698 | "color": 5 699 | }, 700 | "type": "n8n-nodes-base.stickyNote", 701 | "position": [ 702 | 3200, 703 | 0 704 | ], 705 | "typeVersion": 1, 706 | "id": "2be17a9b-8b06-4204-9ca3-82b8c647f2c8", 707 | "name": "Sticky Note14" 708 | }, 709 | { 710 | "parameters": { 711 | "content": "## Send Output to User", 712 | "height": 320, 713 | "width": 480, 714 | "color": 4 715 | }, 716 | "type": "n8n-nodes-base.stickyNote", 717 | "position": [ 718 | 3700, 719 | 0 720 | ], 721 | "typeVersion": 1, 722 | "id": "8a1328fb-78ad-4949-8660-1461dd4721fe", 723 | "name": "Sticky Note15" 724 | }, 725 | { 726 | "parameters": { 727 | "updates": [ 728 | "message" 729 | ], 730 | "additionalFields": {} 731 | }, 732 | "type": "n8n-nodes-base.telegramTrigger", 733 | "typeVersion": 1.2, 734 | "position": [ 735 | -2800, 736 | -120 737 | ], 738 | "id": "c8abae2d-2888-4f65-9598-a6dfc3c14c11", 739 | "name": "Telegram Trigger", 740 | "webhookId": "1683fd9b-1290-46e0-9c99-7e447d415d1f", 741 | "credentials": { 742 | "telegramApi": { 743 | "id": "8UyJRQDQFDoOp2nB", 744 | "name": "Telegram @JagoanhostingBot" 745 | } 746 | } 747 | }, 748 | { 749 | "parameters": { 750 | "conditions": { 751 | "options": { 752 | "caseSensitive": true, 753 | "leftValue": "", 754 | "typeValidation": "loose", 755 | "version": 2 756 | }, 757 | "conditions": [ 758 | { 759 | "id": "33eef9d5-222a-4ac8-bfa5-7475af6f41ab", 760 | "leftValue": "={{ $json.message.from.id }}", 761 | "rightValue": "928922141", 762 | "operator": { 763 | "type": "string", 764 | "operation": "equals", 765 | "name": "filter.operator.equals" 766 | } 767 | } 768 | ], 769 | "combinator": "and" 770 | }, 771 | "looseTypeValidation": true, 772 | "options": {} 773 | }, 774 | "type": "n8n-nodes-base.if", 775 | "typeVersion": 2.2, 776 | "position": [ 777 | -2420, 778 | -120 779 | ], 780 | "id": "723e8380-7f58-4643-973d-f18ee5bc9ae7", 781 | "name": "If User is Allowed" 782 | }, 783 | { 784 | "parameters": { 785 | "content": "## Inbound Chat Receiver", 786 | "height": 240, 787 | "width": 360, 788 | "color": 4 789 | }, 790 | "type": "n8n-nodes-base.stickyNote", 791 | "position": [ 792 | -2540, 793 | -180 794 | ], 795 | "typeVersion": 1, 796 | "id": "7bd8ab5d-0b44-472b-9c4e-b39c472b7501", 797 | "name": "Sticky Note16" 798 | }, 799 | { 800 | "parameters": { 801 | "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}", 802 | "text": "Not allowed ~", 803 | "additionalFields": { 804 | "appendAttribution": false 805 | } 806 | }, 807 | "type": "n8n-nodes-base.telegram", 808 | "typeVersion": 1.2, 809 | "position": [ 810 | -2040, 811 | 20 812 | ], 813 | "id": "b58794da-6cc2-4cc1-ab7c-d5c36f46a847", 814 | "name": "Not Allowed Message", 815 | "webhookId": "6b9576ce-bfb2-452d-8a6d-d10771a144b8", 816 | "credentials": { 817 | "telegramApi": { 818 | "id": "8UyJRQDQFDoOp2nB", 819 | "name": "Telegram @JagoanhostingBot" 820 | } 821 | } 822 | }, 823 | { 824 | "parameters": { 825 | "content": "## Not Allowed", 826 | "height": 240, 827 | "width": 360, 828 | "color": 3 829 | }, 830 | "type": "n8n-nodes-base.stickyNote", 831 | "position": [ 832 | -2160, 833 | -40 834 | ], 835 | "typeVersion": 1, 836 | "id": "bf1546c9-583a-480c-8e25-c93f6fc0fc74", 837 | "name": "Sticky Note17" 838 | }, 839 | { 840 | "parameters": { 841 | "conditions": { 842 | "options": { 843 | "caseSensitive": true, 844 | "leftValue": "", 845 | "typeValidation": "strict", 846 | "version": 2 847 | }, 848 | "conditions": [ 849 | { 850 | "id": "a8c608d9-3bfb-430e-8bd5-4f8e097e902b", 851 | "leftValue": "={{ $json.message.voice }}", 852 | "rightValue": "", 853 | "operator": { 854 | "type": "object", 855 | "operation": "exists", 856 | "singleValue": true 857 | } 858 | } 859 | ], 860 | "combinator": "and" 861 | }, 862 | "options": {} 863 | }, 864 | "type": "n8n-nodes-base.if", 865 | "typeVersion": 2.2, 866 | "position": [ 867 | -2040, 868 | -220 869 | ], 870 | "id": "3d83756c-f76e-4266-96ae-0a16ed5cf7e3", 871 | "name": "If Voice Note" 872 | }, 873 | { 874 | "parameters": { 875 | "resource": "file", 876 | "fileId": "={{ $json.message.voice.file_id }}" 877 | }, 878 | "type": "n8n-nodes-base.telegram", 879 | "typeVersion": 1.2, 880 | "position": [ 881 | -1660, 882 | -260 883 | ], 884 | "id": "177ab71a-4c10-4609-b8ee-6c50bf713ee2", 885 | "name": "Download Audio", 886 | "webhookId": "db5582a7-0662-4c0c-8156-cfc62b5e51d2", 887 | "credentials": { 888 | "telegramApi": { 889 | "id": "8UyJRQDQFDoOp2nB", 890 | "name": "Telegram @JagoanhostingBot" 891 | } 892 | } 893 | }, 894 | { 895 | "parameters": { 896 | "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}", 897 | "text": "={{ $json.output.discussion }}", 898 | "additionalFields": { 899 | "appendAttribution": false 900 | } 901 | }, 902 | "type": "n8n-nodes-base.telegram", 903 | "typeVersion": 1.2, 904 | "position": [ 905 | 820, 906 | 60 907 | ], 908 | "id": "0fba95b9-53f8-4652-857b-3c812cfb49c5", 909 | "name": "Send Discussion", 910 | "webhookId": "98d9c0af-94f5-43e7-9bc2-a5c6a8264627", 911 | "credentials": { 912 | "telegramApi": { 913 | "id": "8UyJRQDQFDoOp2nB", 914 | "name": "Telegram @JagoanhostingBot" 915 | } 916 | } 917 | }, 918 | { 919 | "parameters": { 920 | "operation": "sendAndWait", 921 | "chatId": "=928922141", 922 | "message": "=Apakah saya diizinkan untuk menjalankan perintah dibawah ini di server *{{ $json.output.server }}*?\n\n*{{ $json.output.command }}*\n\nBerikut ini penjelasan dari perintah tersebut :\n_{{ $json.output.explanation }}_", 923 | "approvalOptions": { 924 | "values": { 925 | "approvalType": "double" 926 | } 927 | }, 928 | "options": { 929 | "appendAttribution": false 930 | } 931 | }, 932 | "type": "n8n-nodes-base.telegram", 933 | "typeVersion": 1.2, 934 | "position": [ 935 | 820, 936 | 400 937 | ], 938 | "id": "9445fd19-7c3e-480f-9738-b4a5943df5b2", 939 | "name": "Approval Process", 940 | "webhookId": "76af8f95-b8ce-412d-abe9-6f4f5e51a278", 941 | "credentials": { 942 | "telegramApi": { 943 | "id": "8UyJRQDQFDoOp2nB", 944 | "name": "Telegram @JagoanhostingBot" 945 | } 946 | } 947 | }, 948 | { 949 | "parameters": { 950 | "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}", 951 | "text": "={{ $json.output }}", 952 | "additionalFields": { 953 | "appendAttribution": false 954 | } 955 | }, 956 | "type": "n8n-nodes-base.telegram", 957 | "typeVersion": 1.2, 958 | "position": [ 959 | 3900, 960 | 100 961 | ], 962 | "id": "99debb8d-05e4-42a5-a5de-6bd81a604771", 963 | "name": "Send Response", 964 | "webhookId": "88cfc423-b284-495b-8bd5-70dc976467b5", 965 | "credentials": { 966 | "telegramApi": { 967 | "id": "8UyJRQDQFDoOp2nB", 968 | "name": "Telegram @JagoanhostingBot" 969 | } 970 | } 971 | }, 972 | { 973 | "parameters": { 974 | "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}", 975 | "text": "Baik, saya tidak akan mengeksekusi perintah tersebut. Terima kasih.", 976 | "additionalFields": { 977 | "appendAttribution": false 978 | } 979 | }, 980 | "type": "n8n-nodes-base.telegram", 981 | "typeVersion": 1.2, 982 | "position": [ 983 | 1300, 984 | 420 985 | ], 986 | "id": "744c1e1c-427d-4109-9f24-43a306fa3c57", 987 | "name": "Reject Confirmation", 988 | "webhookId": "56837514-a135-4887-bcfc-9a3e3b68fc1b", 989 | "credentials": { 990 | "telegramApi": { 991 | "id": "8UyJRQDQFDoOp2nB", 992 | "name": "Telegram @JagoanhostingBot" 993 | } 994 | } 995 | }, 996 | { 997 | "parameters": { 998 | "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}", 999 | "text": "Maaf, aku tidak berhasil memproses pesan mu. Silahkan coba lagi, aku akan coba memprosesnya lagi.", 1000 | "additionalFields": {} 1001 | }, 1002 | "type": "n8n-nodes-base.telegram", 1003 | "typeVersion": 1.2, 1004 | "position": [ 1005 | 820, 1006 | 760 1007 | ], 1008 | "id": "6de5d4f3-d1a8-4824-8431-d1b867cb9f33", 1009 | "name": "Error Message", 1010 | "webhookId": "0e0976b9-8de6-4ac1-b91f-55076d3bb8ce", 1011 | "credentials": { 1012 | "telegramApi": { 1013 | "id": "8UyJRQDQFDoOp2nB", 1014 | "name": "Telegram @JagoanhostingBot" 1015 | } 1016 | } 1017 | }, 1018 | { 1019 | "parameters": { 1020 | "content": "## Error Message", 1021 | "height": 320, 1022 | "width": 480, 1023 | "color": 2 1024 | }, 1025 | "type": "n8n-nodes-base.stickyNote", 1026 | "position": [ 1027 | 620, 1028 | 640 1029 | ], 1030 | "typeVersion": 1, 1031 | "id": "4165651a-27d6-4f43-8934-560ecf3c1963", 1032 | "name": "Sticky Note18" 1033 | } 1034 | ], 1035 | "pinData": {}, 1036 | "connections": { 1037 | "If Approved": { 1038 | "main": [ 1039 | [ 1040 | { 1041 | "node": "Switch", 1042 | "type": "main", 1043 | "index": 0 1044 | } 1045 | ], 1046 | [ 1047 | { 1048 | "node": "Reject Confirmation", 1049 | "type": "main", 1050 | "index": 0 1051 | } 1052 | ] 1053 | ] 1054 | }, 1055 | "Switch": { 1056 | "main": [ 1057 | [ 1058 | { 1059 | "node": "SSH - FE", 1060 | "type": "main", 1061 | "index": 0 1062 | } 1063 | ], 1064 | [ 1065 | { 1066 | "node": "SSH - BE", 1067 | "type": "main", 1068 | "index": 0 1069 | } 1070 | ], 1071 | [ 1072 | { 1073 | "node": "SSH - PROXY", 1074 | "type": "main", 1075 | "index": 0 1076 | } 1077 | ] 1078 | ] 1079 | }, 1080 | "Simple Memory": { 1081 | "ai_memory": [ 1082 | [ 1083 | { 1084 | "node": "Sysadmin AI Agent", 1085 | "type": "ai_memory", 1086 | "index": 0 1087 | }, 1088 | { 1089 | "node": "Explainer AI Agent", 1090 | "type": "ai_memory", 1091 | "index": 0 1092 | } 1093 | ] 1094 | ] 1095 | }, 1096 | "Structured Output Parser": { 1097 | "ai_outputParser": [ 1098 | [ 1099 | { 1100 | "node": "Sysadmin AI Agent", 1101 | "type": "ai_outputParser", 1102 | "index": 0 1103 | } 1104 | ] 1105 | ] 1106 | }, 1107 | "COMMAND or DISCUSSION": { 1108 | "main": [ 1109 | [ 1110 | { 1111 | "node": "Send Discussion", 1112 | "type": "main", 1113 | "index": 0 1114 | } 1115 | ], 1116 | [ 1117 | { 1118 | "node": "Approval Process", 1119 | "type": "main", 1120 | "index": 0 1121 | } 1122 | ] 1123 | ] 1124 | }, 1125 | "Merge": { 1126 | "main": [ 1127 | [ 1128 | { 1129 | "node": "Explainer AI Agent", 1130 | "type": "main", 1131 | "index": 0 1132 | } 1133 | ] 1134 | ] 1135 | }, 1136 | "Sysadmin AI Agent": { 1137 | "main": [ 1138 | [ 1139 | { 1140 | "node": "COMMAND or DISCUSSION", 1141 | "type": "main", 1142 | "index": 0 1143 | } 1144 | ], 1145 | [ 1146 | { 1147 | "node": "Error Message", 1148 | "type": "main", 1149 | "index": 0 1150 | } 1151 | ] 1152 | ] 1153 | }, 1154 | "Sysadmin Model": { 1155 | "ai_languageModel": [ 1156 | [ 1157 | { 1158 | "node": "Sysadmin AI Agent", 1159 | "type": "ai_languageModel", 1160 | "index": 0 1161 | } 1162 | ] 1163 | ] 1164 | }, 1165 | "OpenAI": { 1166 | "main": [ 1167 | [ 1168 | { 1169 | "node": "Audio Mapper", 1170 | "type": "main", 1171 | "index": 0 1172 | } 1173 | ] 1174 | ] 1175 | }, 1176 | "Audio Mapper": { 1177 | "main": [ 1178 | [ 1179 | { 1180 | "node": "Data Merge", 1181 | "type": "main", 1182 | "index": 0 1183 | } 1184 | ] 1185 | ] 1186 | }, 1187 | "Data Merge": { 1188 | "main": [ 1189 | [ 1190 | { 1191 | "node": "Sysadmin AI Agent", 1192 | "type": "main", 1193 | "index": 0 1194 | } 1195 | ] 1196 | ] 1197 | }, 1198 | "Edit Fields": { 1199 | "main": [ 1200 | [ 1201 | { 1202 | "node": "Data Merge", 1203 | "type": "main", 1204 | "index": 0 1205 | } 1206 | ] 1207 | ] 1208 | }, 1209 | "SSH - FE": { 1210 | "main": [ 1211 | [ 1212 | { 1213 | "node": "Merge", 1214 | "type": "main", 1215 | "index": 0 1216 | } 1217 | ] 1218 | ] 1219 | }, 1220 | "Explainer AI Agent": { 1221 | "main": [ 1222 | [ 1223 | { 1224 | "node": "Send Response", 1225 | "type": "main", 1226 | "index": 0 1227 | } 1228 | ] 1229 | ] 1230 | }, 1231 | "Explainer Model": { 1232 | "ai_languageModel": [ 1233 | [ 1234 | { 1235 | "node": "Explainer AI Agent", 1236 | "type": "ai_languageModel", 1237 | "index": 0 1238 | } 1239 | ] 1240 | ] 1241 | }, 1242 | "SSH - BE": { 1243 | "main": [ 1244 | [ 1245 | { 1246 | "node": "Merge", 1247 | "type": "main", 1248 | "index": 0 1249 | } 1250 | ] 1251 | ] 1252 | }, 1253 | "SSH - PROXY": { 1254 | "main": [ 1255 | [ 1256 | { 1257 | "node": "Merge", 1258 | "type": "main", 1259 | "index": 0 1260 | } 1261 | ] 1262 | ] 1263 | }, 1264 | "SysadminThinkTool": { 1265 | "ai_tool": [ 1266 | [ 1267 | { 1268 | "node": "Sysadmin AI Agent", 1269 | "type": "ai_tool", 1270 | "index": 0 1271 | } 1272 | ] 1273 | ] 1274 | }, 1275 | "ExplainerThinkTool": { 1276 | "ai_tool": [ 1277 | [ 1278 | { 1279 | "node": "Explainer AI Agent", 1280 | "type": "ai_tool", 1281 | "index": 0 1282 | } 1283 | ] 1284 | ] 1285 | }, 1286 | "Telegram Trigger": { 1287 | "main": [ 1288 | [ 1289 | { 1290 | "node": "If User is Allowed", 1291 | "type": "main", 1292 | "index": 0 1293 | } 1294 | ] 1295 | ] 1296 | }, 1297 | "If User is Allowed": { 1298 | "main": [ 1299 | [ 1300 | { 1301 | "node": "If Voice Note", 1302 | "type": "main", 1303 | "index": 0 1304 | } 1305 | ], 1306 | [ 1307 | { 1308 | "node": "Not Allowed Message", 1309 | "type": "main", 1310 | "index": 0 1311 | } 1312 | ] 1313 | ] 1314 | }, 1315 | "If Voice Note": { 1316 | "main": [ 1317 | [ 1318 | { 1319 | "node": "Download Audio", 1320 | "type": "main", 1321 | "index": 0 1322 | } 1323 | ], 1324 | [ 1325 | { 1326 | "node": "Edit Fields", 1327 | "type": "main", 1328 | "index": 0 1329 | } 1330 | ] 1331 | ] 1332 | }, 1333 | "Download Audio": { 1334 | "main": [ 1335 | [ 1336 | { 1337 | "node": "OpenAI", 1338 | "type": "main", 1339 | "index": 0 1340 | } 1341 | ] 1342 | ] 1343 | }, 1344 | "Approval Process": { 1345 | "main": [ 1346 | [ 1347 | { 1348 | "node": "If Approved", 1349 | "type": "main", 1350 | "index": 0 1351 | } 1352 | ] 1353 | ] 1354 | }, 1355 | "Reject Confirmation": { 1356 | "main": [ 1357 | [] 1358 | ] 1359 | } 1360 | }, 1361 | "active": false, 1362 | "settings": { 1363 | "executionOrder": "v1" 1364 | }, 1365 | "versionId": "80a152cc-86dd-492c-a8ed-871fa4bb3e92", 1366 | "meta": { 1367 | "templateCredsSetupCompleted": true, 1368 | "instanceId": "f1074a8a8cadfd46eea13918e688f4d1dfce88af47514807f67f4dab06d2e497" 1369 | }, 1370 | "id": "7MSqHTxq6S3m0wMV", 1371 | "tags": [] 1372 | } --------------------------------------------------------------------------------