fix(hc-wa-lineworks-response): 認証チェーンの分岐前無条件実行と暗黙ハングを解消
Botマスタ取得/JWTクレーム組み立て/Sign JWT/アクセストークン取得をSwitch分岐前の トランクから外し、直接LINEWORKS API呼び出しを行う4箇所(追加案内送信/日付エラー 送信/ファイル未着送信/LINEWORKSファイルダウンロード)それぞれの直前に複製配置。 待機状態取得0件時とSwitch未一致時に無応答でハングする経路には、明示的な エラーRespond to Webhookへ誘導するIFノード/フォールバック出力を追加した。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
8c8d748a07
commit
3dccdefdcb
@ -228,7 +228,8 @@
|
||||
]
|
||||
},
|
||||
"returnAll": true
|
||||
}
|
||||
},
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "http-site-settings-get",
|
||||
@ -362,8 +363,8 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
3720,
|
||||
500
|
||||
6140,
|
||||
170
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
@ -380,8 +381,8 @@
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
3940,
|
||||
500
|
||||
6360,
|
||||
170
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = Math.floor(Date.now() / 1000);\nconst jwtClaims = JSON.stringify({\n iss: $('LW_BOT_CLIENT_ID取得').item.json.configValue,\n sub: $('LW_BOT_SERVICE_ACCOUNT取得').item.json.configValue,\n iat: now,\n exp: now + 3600,\n aud: 'https://auth.worksmobile.com/oauth2/v2.0/token',\n});\n\n// --- Bot ID解決 ---\n// TODO(Task 12): 484184(LINEWORKS_BOT_MASTER_SITE_ID)の実データ構造は未調査。Task 9(HC-SUB)と同じ暫定実装を踏襲する。\nconst botMasterSiteSettings = $('Botマスタ取得').item.json.Response.Data.SiteSettings;\nconst candidateBotIds = botMasterSiteSettings.BotIds\n || (botMasterSiteSettings.Processes || []).map((p) => p.BotId).filter(Boolean);\nconst botId = candidateBotIds && candidateBotIds[0];\nif (!botId) {\n throw new Error('BotIdを484184(LINEWORKS_BOT_MASTER_SITE_ID)から解決できませんでした。Task 12でBot選択ロジックを実装してください。');\n}\n\nconst targetEmail = $('署名検証・送信者解決').item.json.targetEmail;\nconst apiUrl = 'https://www.worksapis.com/v1.0/bots/' + botId + '/users/' + targetEmail + '/messages';\n\nreturn [{\n json: {\n jwtClaims,\n apiUrl,\n botId,\n targetEmail,\n },\n}];"
|
||||
@ -393,8 +394,8 @@
|
||||
"type": "n8n-nodes-base.jwt",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
4160,
|
||||
500
|
||||
6580,
|
||||
170
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "sign",
|
||||
@ -417,8 +418,8 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
4380,
|
||||
500
|
||||
6800,
|
||||
170
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
@ -511,7 +512,9 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
"options": {
|
||||
"fallbackOutput": "extra"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -708,7 +711,7 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
6140,
|
||||
7020,
|
||||
170
|
||||
],
|
||||
"parameters": {
|
||||
@ -922,18 +925,18 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5480,
|
||||
6600,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "={{ $('JWTクレーム組み立て').item.json.apiUrl }}",
|
||||
"url": "={{ $('JWTクレーム組み立て(日付エラー)').item.json.apiUrl }}",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('アクセストークン取得').item.json.access_token }}"
|
||||
"value": "=Bearer {{ $('アクセストークン取得(日付エラー)').item.json.access_token }}"
|
||||
},
|
||||
{
|
||||
"name": "Content-Type",
|
||||
@ -987,18 +990,18 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5040,
|
||||
5920,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"method": "GET",
|
||||
"url": "={{ 'https://www.worksapis.com/v1.0/bots/' + $('JWTクレーム組み立て').item.json.botId + '/attachments/' + $('署名検証・送信者解決').item.json.fileId }}",
|
||||
"url": "={{ 'https://www.worksapis.com/v1.0/bots/' + $('JWTクレーム組み立て(ファイルDL)').item.json.botId + '/attachments/' + $('署名検証・送信者解決').item.json.fileId }}",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('アクセストークン取得').item.json.access_token }}"
|
||||
"value": "=Bearer {{ $('アクセストークン取得(ファイルDL)').item.json.access_token }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1017,7 +1020,7 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5260,
|
||||
6140,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
@ -1048,7 +1051,7 @@
|
||||
"type": "n8n-nodes-base.dataTable",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
5480,
|
||||
6360,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
@ -1105,7 +1108,7 @@
|
||||
"type": "n8n-nodes-base.executeWorkflow",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
5700,
|
||||
6580,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
@ -1142,18 +1145,18 @@
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5260,
|
||||
900
|
||||
6380,
|
||||
950
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "={{ $('JWTクレーム組み立て').item.json.apiUrl }}",
|
||||
"url": "={{ $('JWTクレーム組み立て(ファイル未着)').item.json.apiUrl }}",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "=Bearer {{ $('アクセストークン取得').item.json.access_token }}"
|
||||
"value": "=Bearer {{ $('アクセストークン取得(ファイル未着)').item.json.access_token }}"
|
||||
},
|
||||
{
|
||||
"name": "Content-Type",
|
||||
@ -1173,7 +1176,7 @@
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
6360,
|
||||
8200,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
@ -1181,6 +1184,358 @@
|
||||
"responseBody": "={{ JSON.stringify({ result: \"ok\" }) }}",
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-bot-master-get-dateerr",
|
||||
"name": "Botマスタ取得(日付エラー)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5480,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "={{ $('PLEASANTER_BASE_URL取得').item.json.configValue }}api/items/{{ $('LINEWORKS_BOT_MASTER_SITE_ID取得').item.json.configValue }}/getsite",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"jsonBody": "={{ JSON.stringify({ ApiVersion: 1.1, ApiKey: $('PLEASANTER_API_KEY取得').item.json.configValue }) }}",
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "code-jwt-claims-dateerr",
|
||||
"name": "JWTクレーム組み立て(日付エラー)",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
5700,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = Math.floor(Date.now() / 1000);\nconst jwtClaims = JSON.stringify({\n iss: $('LW_BOT_CLIENT_ID取得').item.json.configValue,\n sub: $('LW_BOT_SERVICE_ACCOUNT取得').item.json.configValue,\n iat: now,\n exp: now + 3600,\n aud: 'https://auth.worksmobile.com/oauth2/v2.0/token',\n});\n\n// --- Bot ID解決 ---\n// TODO(Task 12): 484184(LINEWORKS_BOT_MASTER_SITE_ID)の実データ構造は未調査。Task 9(HC-SUB)と同じ暫定実装を踏襲する。\nconst botMasterSiteSettings = $('Botマスタ取得(日付エラー)').item.json.Response.Data.SiteSettings;\nconst candidateBotIds = botMasterSiteSettings.BotIds\n || (botMasterSiteSettings.Processes || []).map((p) => p.BotId).filter(Boolean);\nconst botId = candidateBotIds && candidateBotIds[0];\nif (!botId) {\n throw new Error('BotIdを484184(LINEWORKS_BOT_MASTER_SITE_ID)から解決できませんでした。Task 12でBot選択ロジックを実装してください。');\n}\n\nconst targetEmail = $('署名検証・送信者解決').item.json.targetEmail;\nconst apiUrl = 'https://www.worksapis.com/v1.0/bots/' + botId + '/users/' + targetEmail + '/messages';\n\nreturn [{\n json: {\n jwtClaims,\n apiUrl,\n botId,\n targetEmail,\n },\n}];"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "jwt-sign-dateerr",
|
||||
"name": "Sign JWT(日付エラー)",
|
||||
"type": "n8n-nodes-base.jwt",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
5920,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "sign",
|
||||
"useJson": true,
|
||||
"claimsJson": "={{ $json.jwtClaims }}",
|
||||
"options": {
|
||||
"algorithm": "RS256"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jwtAuth": {
|
||||
"id": "Hw0qlEaGfLPnQWp1",
|
||||
"name": "LINEWORKS Bot Private Key (v4)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-access-token-dateerr",
|
||||
"name": "アクセストークン取得(日付エラー)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
6140,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://auth.worksmobile.com/oauth2/v2.0/token",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "assertion",
|
||||
"value": "={{ $json.token }}"
|
||||
},
|
||||
{
|
||||
"name": "grant_type",
|
||||
"value": "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
||||
},
|
||||
{
|
||||
"name": "client_id",
|
||||
"value": "={{ $('LW_BOT_CLIENT_ID取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "client_secret",
|
||||
"value": "={{ $('LW_BOT_CLIENT_SECRET取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"value": "bot"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-bot-master-get-filemiss",
|
||||
"name": "Botマスタ取得(ファイル未着)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5260,
|
||||
950
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "={{ $('PLEASANTER_BASE_URL取得').item.json.configValue }}api/items/{{ $('LINEWORKS_BOT_MASTER_SITE_ID取得').item.json.configValue }}/getsite",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"jsonBody": "={{ JSON.stringify({ ApiVersion: 1.1, ApiKey: $('PLEASANTER_API_KEY取得').item.json.configValue }) }}",
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "code-jwt-claims-filemiss",
|
||||
"name": "JWTクレーム組み立て(ファイル未着)",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
5480,
|
||||
950
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = Math.floor(Date.now() / 1000);\nconst jwtClaims = JSON.stringify({\n iss: $('LW_BOT_CLIENT_ID取得').item.json.configValue,\n sub: $('LW_BOT_SERVICE_ACCOUNT取得').item.json.configValue,\n iat: now,\n exp: now + 3600,\n aud: 'https://auth.worksmobile.com/oauth2/v2.0/token',\n});\n\n// --- Bot ID解決 ---\n// TODO(Task 12): 484184(LINEWORKS_BOT_MASTER_SITE_ID)の実データ構造は未調査。Task 9(HC-SUB)と同じ暫定実装を踏襲する。\nconst botMasterSiteSettings = $('Botマスタ取得(ファイル未着)').item.json.Response.Data.SiteSettings;\nconst candidateBotIds = botMasterSiteSettings.BotIds\n || (botMasterSiteSettings.Processes || []).map((p) => p.BotId).filter(Boolean);\nconst botId = candidateBotIds && candidateBotIds[0];\nif (!botId) {\n throw new Error('BotIdを484184(LINEWORKS_BOT_MASTER_SITE_ID)から解決できませんでした。Task 12でBot選択ロジックを実装してください。');\n}\n\nconst targetEmail = $('署名検証・送信者解決').item.json.targetEmail;\nconst apiUrl = 'https://www.worksapis.com/v1.0/bots/' + botId + '/users/' + targetEmail + '/messages';\n\nreturn [{\n json: {\n jwtClaims,\n apiUrl,\n botId,\n targetEmail,\n },\n}];"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "jwt-sign-filemiss",
|
||||
"name": "Sign JWT(ファイル未着)",
|
||||
"type": "n8n-nodes-base.jwt",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
5700,
|
||||
950
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "sign",
|
||||
"useJson": true,
|
||||
"claimsJson": "={{ $json.jwtClaims }}",
|
||||
"options": {
|
||||
"algorithm": "RS256"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jwtAuth": {
|
||||
"id": "Hw0qlEaGfLPnQWp1",
|
||||
"name": "LINEWORKS Bot Private Key (v4)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-access-token-filemiss",
|
||||
"name": "アクセストークン取得(ファイル未着)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5920,
|
||||
950
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://auth.worksmobile.com/oauth2/v2.0/token",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "assertion",
|
||||
"value": "={{ $json.token }}"
|
||||
},
|
||||
{
|
||||
"name": "grant_type",
|
||||
"value": "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
||||
},
|
||||
{
|
||||
"name": "client_id",
|
||||
"value": "={{ $('LW_BOT_CLIENT_ID取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "client_secret",
|
||||
"value": "={{ $('LW_BOT_CLIENT_SECRET取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"value": "bot"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-bot-master-get-filedl",
|
||||
"name": "Botマスタ取得(ファイルDL)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5040,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "={{ $('PLEASANTER_BASE_URL取得').item.json.configValue }}api/items/{{ $('LINEWORKS_BOT_MASTER_SITE_ID取得').item.json.configValue }}/getsite",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"jsonBody": "={{ JSON.stringify({ ApiVersion: 1.1, ApiKey: $('PLEASANTER_API_KEY取得').item.json.configValue }) }}",
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "code-jwt-claims-filedl",
|
||||
"name": "JWTクレーム組み立て(ファイルDL)",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
5260,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const now = Math.floor(Date.now() / 1000);\nconst jwtClaims = JSON.stringify({\n iss: $('LW_BOT_CLIENT_ID取得').item.json.configValue,\n sub: $('LW_BOT_SERVICE_ACCOUNT取得').item.json.configValue,\n iat: now,\n exp: now + 3600,\n aud: 'https://auth.worksmobile.com/oauth2/v2.0/token',\n});\n\n// --- Bot ID解決 ---\n// TODO(Task 12): 484184(LINEWORKS_BOT_MASTER_SITE_ID)の実データ構造は未調査。Task 9(HC-SUB)と同じ暫定実装を踏襲する。\nconst botMasterSiteSettings = $('Botマスタ取得(ファイルDL)').item.json.Response.Data.SiteSettings;\nconst candidateBotIds = botMasterSiteSettings.BotIds\n || (botMasterSiteSettings.Processes || []).map((p) => p.BotId).filter(Boolean);\nconst botId = candidateBotIds && candidateBotIds[0];\nif (!botId) {\n throw new Error('BotIdを484184(LINEWORKS_BOT_MASTER_SITE_ID)から解決できませんでした。Task 12でBot選択ロジックを実装してください。');\n}\n\nconst targetEmail = $('署名検証・送信者解決').item.json.targetEmail;\nconst apiUrl = 'https://www.worksapis.com/v1.0/bots/' + botId + '/users/' + targetEmail + '/messages';\n\nreturn [{\n json: {\n jwtClaims,\n apiUrl,\n botId,\n targetEmail,\n },\n}];"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "jwt-sign-filedl",
|
||||
"name": "Sign JWT(ファイルDL)",
|
||||
"type": "n8n-nodes-base.jwt",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
5480,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "sign",
|
||||
"useJson": true,
|
||||
"claimsJson": "={{ $json.jwtClaims }}",
|
||||
"options": {
|
||||
"algorithm": "RS256"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jwtAuth": {
|
||||
"id": "Hw0qlEaGfLPnQWp1",
|
||||
"name": "LINEWORKS Bot Private Key (v4)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "http-access-token-filedl",
|
||||
"name": "アクセストークン取得(ファイルDL)",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
5700,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://auth.worksmobile.com/oauth2/v2.0/token",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "assertion",
|
||||
"value": "={{ $json.token }}"
|
||||
},
|
||||
{
|
||||
"name": "grant_type",
|
||||
"value": "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
||||
},
|
||||
{
|
||||
"name": "client_id",
|
||||
"value": "={{ $('LW_BOT_CLIENT_ID取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "client_secret",
|
||||
"value": "={{ $('LW_BOT_CLIENT_SECRET取得').item.json.configValue }}"
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"value": "bot"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "if-state-exists",
|
||||
"name": "待機状態存在チェック",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
2400,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "loose",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "cond-1",
|
||||
"leftValue": "={{ !!($('待機状態取得').item.json.awaitInput) }}",
|
||||
"rightValue": true,
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "respond-error-no-state",
|
||||
"name": "Respond to Webhook(待機状態エラー)",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
2620,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({ result: \"error\", message: \"待機状態が見つかりません\" }) }}",
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "respond-error-switch-fallback",
|
||||
"name": "Respond to Webhook(分岐エラー)",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
4820,
|
||||
1150
|
||||
],
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({ result: \"error\", message: \"未対応のawaitInput値です: \" + ($('待機状態取得').item.json.awaitInput ?? '(undefined)') }) }}",
|
||||
"options": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
@ -1298,7 +1653,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "サイト設定取得",
|
||||
"node": "待機状態存在チェック",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@ -1350,50 +1705,6 @@
|
||||
]
|
||||
},
|
||||
"LINEWORKS_BOT_MASTER_SITE_ID取得": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Botマスタ取得",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Botマスタ取得": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JWTクレーム組み立て",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JWTクレーム組み立て": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sign JWT",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sign JWT": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "アクセストークン取得",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"アクセストークン取得": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
@ -1426,6 +1737,13 @@
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook(分岐エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -1502,7 +1820,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "追加案内送信",
|
||||
"node": "Botマスタ取得",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@ -1597,7 +1915,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "日付エラー送信",
|
||||
"node": "Botマスタ取得(日付エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@ -1630,7 +1948,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "LINEWORKSファイルダウンロード",
|
||||
"node": "Botマスタ取得(ファイルDL)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@ -1681,7 +1999,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "ファイル未着送信",
|
||||
"node": "Botマスタ取得(ファイル未着)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@ -1709,6 +2027,200 @@
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Botマスタ取得": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JWTクレーム組み立て",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JWTクレーム組み立て": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sign JWT",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sign JWT": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "アクセストークン取得",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"アクセストークン取得": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "追加案内送信",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Botマスタ取得(日付エラー)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JWTクレーム組み立て(日付エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JWTクレーム組み立て(日付エラー)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sign JWT(日付エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sign JWT(日付エラー)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "アクセストークン取得(日付エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"アクセストークン取得(日付エラー)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "日付エラー送信",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Botマスタ取得(ファイル未着)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JWTクレーム組み立て(ファイル未着)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JWTクレーム組み立て(ファイル未着)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sign JWT(ファイル未着)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sign JWT(ファイル未着)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "アクセストークン取得(ファイル未着)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"アクセストークン取得(ファイル未着)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "ファイル未着送信",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Botマスタ取得(ファイルDL)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JWTクレーム組み立て(ファイルDL)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JWTクレーム組み立て(ファイルDL)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Sign JWT(ファイルDL)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Sign JWT(ファイルDL)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "アクセストークン取得(ファイルDL)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"アクセストークン取得(ファイルDL)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "LINEWORKSファイルダウンロード",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"待機状態存在チェック": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "サイト設定取得",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook(待機状態エラー)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user