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": "7f5055b6.6ac83c", | |
"type": "http in", | |
"z": "e9ed6c54.27109", | |
"name": "POST sample ", | |
"url": "/sample", | |
"method": "post", | |
"upload": false, | |
"swaggerDoc": "", | |
"x": 95, | |
"y": 75, | |
"wires": [ | |
[ | |
"d55ce5ac.6feef8" | |
] | |
] | |
}, | |
{ | |
"id": "d55ce5ac.6feef8", | |
"type": "function", | |
"z": "e9ed6c54.27109", | |
"name": "request body header作成", | |
"func": "var event = msg.payload[\"events\"][0];\nif(event[\"message\"][\"type\"] != \"text\"){\n return msg;\n}\nvar message = event[\"message\"][\"text\"];\nvar replyToken = event[\"replyToken\"];\nvar replyMessage = {\"type\": \"text\", \"text\": message}\nmsg.payload = {\"messages\": [replyMessage], \"replyToken\": replyToken};\nmsg.headers ={ \"Content-Type\": \"application/json\", \"Authorization\": \"Bearer XXXXX\"};\n\nreturn msg", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 307, | |
"y": 75, | |
"wires": [ | |
[ | |
"c0937d88.f5d79", | |
"827480b6.8a011" | |
] | |
] | |
}, | |
{ | |
"id": "c0937d88.f5d79", | |
"type": "http request", | |
"z": "e9ed6c54.27109", | |
"name": "LINE REPLY API実行", | |
"method": "POST", | |
"ret": "txt", | |
"url": "https://api.line.me/v2/bot/message/reply", | |
"tls": "", | |
"x": 627, | |
"y": 106, | |
"wires": [ | |
[ | |
"de6721d2.d6d9c" | |
] | |
] | |
}, | |
{ | |
"id": "de6721d2.d6d9c", | |
"type": "debug", | |
"z": "e9ed6c54.27109", | |
"name": "APIリクエスト結果表示", | |
"active": true, | |
"console": "false", | |
"complete": "payload", | |
"x": 902, | |
"y": 106, | |
"wires": [] | |
}, | |
{ | |
"id": "827480b6.8a011", | |
"type": "debug", | |
"z": "e9ed6c54.27109", | |
"name": "request内容デバッグ表示", | |
"active": true, | |
"console": "false", | |
"complete": "payload", | |
"x": 640, | |
"y": 50, | |
"wires": [] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment