Created
November 23, 2019 00:32
-
-
Save utaani/52966e681e3b7911d0238a191c919299 to your computer and use it in GitHub Desktop.
LineNotify with Image sample (function node「メッセージ作成」のtokenstringsの部分をご自身のものに入れ替えてください)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "f8520b99.0d75c", | |
"type": "inject", | |
"z": "fe7d9b9b.368ed8", | |
"name": "", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"x": 160, | |
"y": 220, | |
"wires": [ | |
[ | |
"82e67ef7.8ae8d8" | |
] | |
] | |
}, | |
{ | |
"id": "ef6db0ec.8eb1c", | |
"type": "http request", | |
"z": "fe7d9b9b.368ed8", | |
"name": "LineNotifyに送信", | |
"method": "POST", | |
"ret": "txt", | |
"paytoqs": false, | |
"url": "https://notify-api.line.me/api/notify", | |
"tls": "7ec9ecab.9bc5dc", | |
"persist": false, | |
"proxy": "", | |
"authType": "", | |
"x": 410, | |
"y": 340, | |
"wires": [ | |
[ | |
"fe2dc22e.d3047", | |
"92823616.94c0f8", | |
"d97f1b37.307ce8", | |
"71063f8b.7cd98" | |
] | |
] | |
}, | |
{ | |
"id": "fe2dc22e.d3047", | |
"type": "debug", | |
"z": "fe7d9b9b.368ed8", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"x": 630, | |
"y": 220, | |
"wires": [] | |
}, | |
{ | |
"id": "82e67ef7.8ae8d8", | |
"type": "file in", | |
"z": "fe7d9b9b.368ed8", | |
"name": "送信画像(PNG/JPGファイル指定)", | |
"filename": "/home/uenode/static/sodane.png", | |
"format": "", | |
"chunk": false, | |
"sendError": false, | |
"encoding": "none", | |
"x": 280, | |
"y": 280, | |
"wires": [ | |
[ | |
"d343e18f.4e18c" | |
] | |
] | |
}, | |
{ | |
"id": "d343e18f.4e18c", | |
"type": "function", | |
"z": "fe7d9b9b.368ed8", | |
"name": "メッセージ作成", | |
"func": "var img = msg.payload;\n\nmsg.payload = {\n \"message\": \"テキストメッセージ\",\n \"imageFile\": {\n \"value\":img,\n \"options\": {\n \"filename\":\"orange.png\",\n \"contentType\":\"image/png\"\n }\n }\n};\n\nmsg.headers = {\n \"authorization\": \"Bearer tokenstrings\",\n \"content-type\": \"multipart/form-data\"\n};\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 220, | |
"y": 340, | |
"wires": [ | |
[ | |
"ef6db0ec.8eb1c" | |
] | |
] | |
}, | |
{ | |
"id": "92823616.94c0f8", | |
"type": "debug", | |
"z": "fe7d9b9b.368ed8", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "headers", | |
"targetType": "msg", | |
"x": 630, | |
"y": 260, | |
"wires": [] | |
}, | |
{ | |
"id": "d97f1b37.307ce8", | |
"type": "debug", | |
"z": "fe7d9b9b.368ed8", | |
"name": "残りNotify送信回数", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "headers[\"x-ratelimit-remaining\"]", | |
"targetType": "msg", | |
"x": 650, | |
"y": 300, | |
"wires": [] | |
}, | |
{ | |
"id": "71063f8b.7cd98", | |
"type": "debug", | |
"z": "fe7d9b9b.368ed8", | |
"name": "残りイメージ送信回数", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "headers[\"x-ratelimit-imageremaining\"]", | |
"targetType": "msg", | |
"x": 660, | |
"y": 340, | |
"wires": [] | |
}, | |
{ | |
"id": "7ec9ecab.9bc5dc", | |
"type": "tls-config", | |
"z": "", | |
"name": "", | |
"cert": "", | |
"key": "", | |
"ca": "", | |
"certname": "", | |
"keyname": "", | |
"caname": "", | |
"servername": "", | |
"verifyservercert": true | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment