{ "name": "Send a Lark Group Message", "tags": [ { "id": "96KbUn85yy8jivyf", "name": "Creator", "createdAt": "2024-10-22T04:22:34.463Z", "updatedAt": "2024-10-22T04:22:34.463Z" } ], "nodes": [ { "id": "send-a-lark-group-message-0", "name": "When clicking ‘Test workflow’", "type": "n8n-nodes-base.manualTrigger", "position": [ 240, 220 ], "parameters": {}, "typeVersion": 1 }, { "id": "send-a-lark-group-message-1", "name": "Input", "type": "n8n-nodes-base.set", "position": [ 440, 220 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "121fcf72-2a13-4082-a66b-47d56bd4a675", "name": "chat_id", "type": "string", "value": "YOUR_CHAT_ID" }, { "id": "c22bf4f3-eac7-4c04-8b2e-8c0e5011bc1e", "name": "text", "type": "string", "value": "https://hiroshidigital.com/" } ] } }, "typeVersion": 3.4 }, { "id": "send-a-lark-group-message-2", "name": "Send Message", "type": "n8n-nodes-base.httpRequest", "position": [ 840, 220 ], "parameters": { "method": "POST", "url": "https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={{ {receive_id:$json.chat_id,msg_type:'text',content:JSON.stringify({text:$json.text})} }}", "options": {} }, "typeVersion": 4.2 }, { "name": "Confirm message", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1060, 220 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "function check({response}){if(response?.code!==0||!response?.data?.message_id)throw Error('Lark did not confirm the message; check the chat before retrying');return{result:response}}\n\nreturn {json:check({response:$json}).result};" }, "id": "send-a-lark-group-message-3" } ], "active": false, "pinData": {}, "settings": { "executionOrder": "v1" }, "connections": { "When clicking ‘Test workflow’": { "main": [ [ { "node": "Input", "type": "main", "index": 0 } ] ] }, "Input": { "main": [ [ { "node": "Send Message", "type": "main", "index": 0 } ] ] }, "Send Message": { "main": [ [ { "node": "Confirm message", "type": "main", "index": 0 } ] ] } } }