{ "name": "Send a Daily Gratitude Reminder on LINE", "tags": [], "nodes": [ { "id": "daily-gratitude-reminder-on-line-0", "name": "Trigger 2100 Bear Gratitude Jar Notice", "type": "n8n-nodes-base.scheduleTrigger", "position": [ -80, -100 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 21, "triggerAtMinute": 0 } ] } }, "typeVersion": 1.2 }, { "id": "daily-gratitude-reminder-on-line-1", "name": "WriteReminder", "type": "@n8n/n8n-nodes-langchain.chainLlm", "position": [ 180, -100 ], "parameters": { "text": "=Today is a wonderful day! 🌟 What or who brought a smile to your face today? 😊\n", "messages": { "messageValues": [ { "message": "You'll rewrite this message to send reminder to user to record good thing today." } ] }, "promptType": "define" }, "typeVersion": 1.5 }, { "id": "daily-gratitude-reminder-on-line-2", "name": "Azure OpenAI Chat Model", "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi", "position": [ 280, -20 ], "parameters": { "model": "4o", "options": { "temperature": 0.9 } }, "typeVersion": 1 }, { "name": "Prepare the LINE message", "type": "n8n-nodes-base.code", "typeVersion": 2, "parameters": { "mode": "runOnceForAllItems", "jsCode": "const text=$input.first().json.text;if(typeof text!=='string'||!text.trim()||text.length>5000)throw Error('Expected a nonempty LINE message of at most 5000 characters');return [{json:{to:'YOUR_LINE_DESTINATION_ID',messages:[{type:'text',text:text.trim()}]}}];" }, "id": "daily-gratitude-reminder-on-line-3" }, { "id": "daily-gratitude-reminder-on-line-4", "name": "Send the LINE reminder", "type": "n8n-nodes-base.httpRequest", "position": [ 940, -100 ], "parameters": { "method": "POST", "url": "https://api.line.me/v2/bot/message/push", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={{ $json }}", "options": {} }, "typeVersion": 4.2 } ], "active": false, "pinData": {}, "settings": { "timezone": "Asia/Bangkok", "callerPolicy": "workflowsFromSameOwner", "executionOrder": "v1" }, "connections": { "Trigger 2100 Bear Gratitude Jar Notice": { "main": [ [ { "node": "WriteReminder", "type": "main", "index": 0 } ] ] }, "Azure OpenAI Chat Model": { "ai_languageModel": [ [ { "node": "WriteReminder", "type": "ai_languageModel", "index": 0 } ] ] }, "WriteReminder": { "main": [ [ { "node": "Prepare the LINE message", "type": "main", "index": 0 } ] ] }, "Prepare the LINE message": { "main": [ [ { "node": "Send the LINE reminder", "type": "main", "index": 0 } ] ] } } }