メールフィルターアップデート
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"path": "u/akiracraftwork/hourly_chime",
|
||||
"summary": "鳩時計機能",
|
||||
"description": "",
|
||||
"description": "毎正時にAlexaで時刻を読み上げる。失敗時はLINEで通知。",
|
||||
"value": {
|
||||
"modules": [
|
||||
{
|
||||
@@ -27,7 +27,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"failure_module": {
|
||||
"id": "failure",
|
||||
"value": {
|
||||
"type": "rawscript",
|
||||
"content": "import * as wmill from \"windmill-client\";\n\nexport async function main() {\n const token = await wmill.getVariable(\"u/admin/LINE_CHANNEL_ACCESS_TOKEN\");\n const to = await wmill.getVariable(\"u/admin/LINE_TO\");\n\n const message = [\n \"\\u26a0\\ufe0f \\u9ce9\\u6642\\u8a08\\u30a8\\u30e9\\u30fc\",\n \"\",\n \"Alexa TTS API \\u304c\\u5931\\u6557\\u3057\\u307e\\u3057\\u305f\\u3002\",\n \"Cookie\\u306e\\u671f\\u9650\\u5207\\u308c\\u306e\\u53ef\\u80fd\\u6027\\u304c\\u3042\\u308a\\u307e\\u3059\\u3002\",\n \"\",\n \"\\u5bfe\\u51e6: auth4.js \\u3067 Cookie \\u3092\\u518d\\u53d6\\u5f97\\u3057\\u3066\\u304f\\u3060\\u3055\\u3044\\u3002\"\n ].join(\"\\n\");\n\n const res = await fetch(\"https://api.line.me/v2/bot/message/push\", {\n method: \"POST\",\n headers: {\n \"Authorization\": `Bearer ${token}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n to: to,\n messages: [{ type: \"text\", text: message }],\n }),\n });\n\n if (!res.ok) {\n const body = await res.text();\n throw new Error(`LINE API error ${res.status}: ${body}`);\n }\n\n return { notified: true };\n}\n",
|
||||
"language": "bun",
|
||||
"input_transforms": {}
|
||||
},
|
||||
"summary": "エラー時LINE通知"
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
|
||||
Reference in New Issue
Block a user