{ "kind": "open-flow-workflow", "version": 1, "name": "Send a Lark Group Message", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_7fc634a28bcd2c17": { "name": "Run the example", "kind": "start", "inputDefs": [] }, "n_383f2f40b81fc9aa": { "inputs": { "chatId": { "kind": "value", "value": "YOUR_CHAT_ID" }, "text": { "kind": "value", "value": "https://hiroshidigital.com/" } }, "name": "Prepare the message", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "chatId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "text" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Prepare the message", "moduleId": "n_41c7761477034df2", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_24247b00e9f3ef34": { "inputs": { "url": { "kind": "value", "value": "https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id" }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_383f2f40b81fc9aa", "output": "body" } ] }, "auth.token": { "kind": "unset" } }, "name": "Send to Lark", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Send to Lark", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "bearer" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_31f526533c7720ab": { "inputs": { "response": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_24247b00e9f3ef34", "output": "body" } ] } }, "name": "Confirm message", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "response" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "result" } ], "name": "Confirm message", "moduleId": "n_01e2664f04ceb037", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_277db3f62aaa5f12": { "name": "Message result", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "result" } ], "outputMappings": { "result": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_31f526533c7720ab", "output": "result" } ] } } } }, "edges": [ { "source": "n_7fc634a28bcd2c17", "target": "n_383f2f40b81fc9aa" }, { "source": "n_383f2f40b81fc9aa", "target": "n_24247b00e9f3ef34" }, { "source": "n_24247b00e9f3ef34", "target": "n_31f526533c7720ab" }, { "source": "n_31f526533c7720ab", "target": "n_277db3f62aaa5f12" } ] } }, "modules": { "n_41c7761477034df2": { "name": "Prepare the message", "imports": [], "source": "export default function body({chatId,text}){return{body:{receive_id:chatId,msg_type:'text',content:JSON.stringify({text})}}}\n" }, "n_01e2664f04ceb037": { "name": "Confirm message", "imports": [], "source": "export default 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" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }