Updating n8n flows for AOS demo environment

This commit is contained in:
Peter Morton 2025-09-26 13:28:07 -05:00
parent 91f47f01a5
commit 33ac363338
2 changed files with 452 additions and 120 deletions

View File

@ -11,7 +11,7 @@
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-288,
192
96
]
},
{
@ -29,65 +29,12 @@
"notesInFlow": true,
"credentials": {
"globalConstantsApi": {
"id": "BAaySM6nkSxflDzN",
"name": "Copilot Settings - verint.com"
"id": "xmv19uxMNq5yPWTc",
"name": "Copilot Settings - Engage"
}
},
"notes": "Settings for Copilot"
},
{
"parameters": {},
"type": "n8n-nodes-globals.globalConstants",
"typeVersion": 1,
"position": [
-64,
384
],
"id": "57b5ca51-7c90-4c55-aace-3223cc46e368",
"name": "m2m - v2 - settings",
"credentials": {
"globalConstantsApi": {
"id": "gh5k8MY0pyS6Fbkc",
"name": "Work Assist - m2m - v2 - 78ab8a80-88a3-4db0-a3f9-36e7aeef18db"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://api.verint.com/vcp/identity-dev/integration/auth/v2/oauth/token",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "grant_type",
"value": "client_credentials"
},
{
"name": "client_id",
"value": "={{ $json.constants.client_id_v2 }}"
},
{
"name": "client_secret",
"value": "={{ $json.constants.client_secret_v2 }}"
},
{
"name": "audience",
"value": "api://vcp/wa-cloudevent"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
160,
384
],
"id": "e537cdb1-c5f6-4883-98ba-e883dd963e96",
"name": "V2 Auth Token"
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nconst uuid = require('uuid');\n\nreturn { \n call_uuid: uuid.v4(),\n conversationId: uuid.v4()\n};"
@ -137,12 +84,6 @@
"name": "conversationId",
"value": "={{ $json.conversationId }}",
"type": "string"
},
{
"id": "eea41372-42da-4dc5-87f7-30263e332fc0",
"name": "v2_auth",
"value": "={ \n access_token: \"{{ $json.access_token }}\",\n token_type: \"{{ $json.token_type }}\"\n}",
"type": "object"
}
]
},
@ -151,26 +92,11 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
608,
192
384,
96
],
"id": "ac3446d5-fd95-4889-a6cd-5af021e4e4a2",
"name": "Edit Fields"
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
384,
192
],
"id": "9b038fd8-3182-4e8c-a0b1-056dff0f0c19",
"name": "Merge1"
}
],
"pinData": {},
@ -187,11 +113,6 @@
"node": "UUIDs",
"type": "main",
"index": 0
},
{
"node": "m2m - v2 - settings",
"type": "main",
"index": 0
}
]
]
@ -207,17 +128,6 @@
]
]
},
"m2m - v2 - settings": {
"main": [
[
{
"node": "V2 Auth Token",
"type": "main",
"index": 0
}
]
]
},
"UUIDs": {
"main": [
[
@ -233,49 +143,34 @@
"main": [
[
{
"node": "Merge1",
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"V2 Auth Token": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Edit Fields": {
"main": [
[]
]
},
"Merge1": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "019c4940-4f70-4e41-a24c-a3eecf367a9a",
"versionId": "4db9ffc7-ae4e-4c15-a993-b97fccc398ba",
"meta": {
"instanceId": "1d14171834eac77e3e796e3342933fbc57a33295e898b249017b9d12b57d9e0c"
},
"id": "YynY08QotHPGCfC3",
"tags": []
"tags": [
{
"createdAt": "2025-08-12T04:26:36.130Z",
"updatedAt": "2025-08-12T04:26:36.130Z",
"id": "C5NhHOyZA61CPBqG",
"name": "Copilot"
}
]
}

View File

@ -0,0 +1,437 @@
{
"name": "Simulator - JCP",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1760,
-1744
],
"id": "6b3caef3-c7ec-4ce7-b5b4-97ffc96adb3a",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"amount": 0.5
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-1088,
-1744
],
"id": "3654072f-b2c8-4b8b-9caa-3aab13a2639c",
"name": "Wait",
"webhookId": "577f02aa-af35-470d-9592-387da9cdf39d"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Setup').item.json.copilot.base_url }}/v2/call-summary ",
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"customerId\": \"{{ $('Setup').item.json.copilot.customer_id }}\",\n \"id\": \"288506ac-bbfc-44cf-883f-9d7a90464eac\",\n \"upn\": \"{{ $('Setup').item.json.copilot.upn }}\",\n \"summary\": \"The caller returned a phone call from JC Penny regarding a missed payment. They provided payment over the phone and the agent let them know that they can go ahead and use their card againg. The caller expressed his gratitude and hung up.\",\n \"title\": \"Call complete summary\",\n \"callId\": \"{{ $('Setup').item.json.copilot.user_uuid }}\",\n \"callerNumber\": \"562-765-9276\",\n \"startTime\": \"{{$now.toISO()}}\",\n \"endTime\": \"{{$now.toISO()}}\",\n \"editable\": false\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
480,
-1744
],
"id": "8da05161-d4c1-403d-a5a1-3158ba07630f",
"name": "Summary",
"credentials": {
"oAuth2Api": {
"id": "vJSWVVZpHyL2DAkk",
"name": "Work Assist INNO (v2) - wa-callsummary"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "YynY08QotHPGCfC3",
"mode": "list",
"cachedResultUrl": "/workflow/YynY08QotHPGCfC3",
"cachedResultName": "Copilot Setup"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"options": {}
},
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
-1536,
-1744
],
"id": "41a3dfec-f10d-45f1-8d84-131528468a26",
"name": "Setup"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1376,
-1840
],
"id": "1a8948a1-b40a-4c03-a8be-fe69d41d5624",
"name": "Sticky Note"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
416,
-1840
],
"id": "b32e2e89-6e9c-4b51-87de-740c8813c78c",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-928,
-1840
],
"id": "3009ccce-a1b8-4224-9fbe-d24facc31c85",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-480,
-1840
],
"id": "1d9b3224-34a1-4625-9938-8fab16121c88",
"name": "Sticky Note3"
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Check Flags\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-416,
-1744
],
"id": "d330a658-5f3d-4b4e-810b-87b4b8c8c7f1",
"name": "Flag 26 Warning",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-32,
-1840
],
"id": "58dbae9c-32cc-4197-9712-d823e2c64e37",
"name": "Sticky Note4"
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Payment Successful\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
32,
-1744
],
"id": "cdf12914-bdba-4018-8652-3bb1140737c5",
"name": "Payment Successful",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"amount": 15
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-192,
-1744
],
"id": "b6f1889a-589c-4a19-beea-576cccd7ba3f",
"name": "Processing Payment",
"webhookId": "98e2c915-0fb6-4175-b7b3-cf02c3c864b7"
},
{
"parameters": {
"resume": "form",
"formTitle": "Wait for Payment SMS to be sent",
"formDescription": "Click Submit to signify SMS was sent.",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-640,
-1744
],
"id": "731cafcd-7b96-4799-a9da-53237a40c268",
"name": "Wait for Payment Success",
"webhookId": "18db362b-c28f-4623-817a-218b94951c0e",
"executeOnce": true
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Credit Card Summary\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"{{ $('Setup').item.json.copilot.user_uuid }}\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-864,
-1744
],
"id": "2681cf35-5acf-4dd7-9afc-b3a6e8a30feb",
"name": "Credit Card Summary",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"resume": "form",
"formTitle": "Call End Event",
"formDescription": "Click here to end call",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
256,
-1744
],
"id": "0ab3b6bb-8fe9-487c-87f8-538d76d7c84f",
"name": "Wait for Call End",
"webhookId": "2cbeb161-5438-4a30-b6cb-83c2a684a9d3",
"executeOnce": true
},
{
"parameters": {
"method": "POST",
"url": "={{ $json.copilot.base_url }}/v1/cloud-event",
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"source\": \"//iva/live-demo/transfer\",\n \"id\": \"2025051416334592900000000000000001\",\n \"type\": \"iva.transfer.data.v1\",\n \"time\": \"{{$now.toISO()}}\",\n \"customerId\": \"{{ $json.copilot.customer_id }}\",\n \"upn\": \"{{ $json.copilot.upn }}\",\n \"userUUID\": \"{{ $json.copilot.user_uuid }}\", \n \"data\": {\n \"conversationId\": \"2025051416334592900000000000000001\",\n \"customData\": {\n \"summary\": \"Caller received an outbound notification about a missed payment and had some follow up questions.\",\n \"purpose\": \"Collections\",\n \"customerName\": \"Mr. David Campbell\",\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"phoneNumber\": \"9887655432\",\n \"memberId\": \"****-****-****-3123\",\n \"queue\": \"Collections\",\n \"timeInQueue\": \"4m 20s\",\n \"address\": \"456 Elm Street, Springfield, IL 62701\",\n \"language\": \"English\",\n \"lastContact\": \"Called 4 days ago\",\n \"customerType\": \"👜 JC Penney\"\n }\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-1312,
-1744
],
"id": "51a31f42-c189-40b1-9fee-e1e3cb32bf67",
"name": "Smart Transfer (1)",
"executeOnce": false,
"notesInFlow": true,
"credentials": {
"oAuth2Api": {
"id": "Epyko0hXgdKjHvdH",
"name": "Work Assist INNO (v2) - wa-cloudevent"
}
},
"notes": "Simulate Recorder Start Call Event"
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Setup",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Credit Card Summary",
"type": "main",
"index": 0
}
]
]
},
"Summary": {
"main": [
[]
]
},
"Setup": {
"main": [
[
{
"node": "Smart Transfer (1)",
"type": "main",
"index": 0
}
]
]
},
"Flag 26 Warning": {
"main": [
[
{
"node": "Processing Payment",
"type": "main",
"index": 0
}
]
]
},
"Payment Successful": {
"main": [
[
{
"node": "Wait for Call End",
"type": "main",
"index": 0
}
]
]
},
"Processing Payment": {
"main": [
[
{
"node": "Payment Successful",
"type": "main",
"index": 0
}
]
]
},
"Wait for Payment Success": {
"main": [
[
{
"node": "Flag 26 Warning",
"type": "main",
"index": 0
}
]
]
},
"Credit Card Summary": {
"main": [
[
{
"node": "Wait for Payment Success",
"type": "main",
"index": 0
}
]
]
},
"Wait for Call End": {
"main": [
[
{
"node": "Summary",
"type": "main",
"index": 0
}
]
]
},
"Smart Transfer (1)": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "5c70a085-78dd-4ee0-9c84-6ee2278bbfdb",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1d14171834eac77e3e796e3342933fbc57a33295e898b249017b9d12b57d9e0c"
},
"id": "cFzOjaQ3ZDrGSBuU",
"tags": [
{
"createdAt": "2025-08-12T04:26:36.130Z",
"updatedAt": "2025-08-12T04:26:36.130Z",
"id": "C5NhHOyZA61CPBqG",
"name": "Copilot"
}
]
}