Adding n8n workflows

This commit is contained in:
Peter Morton 2025-08-22 19:23:05 -05:00
parent 39d03d4b3a
commit 8a648f7515
2 changed files with 647 additions and 0 deletions

View File

@ -0,0 +1,281 @@
{
"name": "Copilot Setup",
"nodes": [
{
"parameters": {
"inputSource": "passthrough"
},
"id": "c055762a-8fe7-4141-a639-df2372f30060",
"typeVersion": 1.1,
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-288,
192
]
},
{
"parameters": {
"constantsKeyName": "copilot"
},
"type": "n8n-nodes-globals.globalConstants",
"typeVersion": 1,
"position": [
-64,
0
],
"id": "5a51dc99-5c56-4e6e-ad67-52698f87fa4e",
"name": "Copilot Settings",
"notesInFlow": true,
"credentials": {
"globalConstantsApi": {
"id": "BAaySM6nkSxflDzN",
"name": "Copilot Settings - verint.com"
}
},
"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};"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-64,
192
],
"id": "10edfbda-aa32-437a-b7f5-a0f86090ec5a",
"name": "UUIDs"
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
160,
96
],
"id": "35cf8d14-be4f-4517-8525-5644158f9d41",
"name": "Merge"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b585e94c-5a47-4278-8413-5825c02cdfeb",
"name": "copilot",
"value": "={{ $json.copilot }}",
"type": "object"
},
{
"id": "dfdc7d1a-4afe-402a-8b2e-0971d4188115",
"name": "call_uuid",
"value": "={{ $json.call_uuid }}",
"type": "string"
},
{
"id": "cebb1eb9-828b-44f8-b5e6-c062b629985a",
"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"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
608,
192
],
"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": {},
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Copilot Settings",
"type": "main",
"index": 0
},
{
"node": "UUIDs",
"type": "main",
"index": 0
},
{
"node": "m2m - v2 - settings",
"type": "main",
"index": 0
}
]
]
},
"Copilot Settings": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"m2m - v2 - settings": {
"main": [
[
{
"node": "V2 Auth Token",
"type": "main",
"index": 0
}
]
]
},
"UUIDs": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Merge1",
"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",
"meta": {
"instanceId": "1d14171834eac77e3e796e3342933fbc57a33295e898b249017b9d12b57d9e0c"
},
"id": "YynY08QotHPGCfC3",
"tags": []
}

View File

@ -0,0 +1,366 @@
{
"name": "Simulator - Order Scheduling Scenario",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1760,
-1744
],
"id": "c486958c-ced5-45b9-a81c-75a275f63e78",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"amount": 0.5
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-1088,
-1744
],
"id": "3e4ad7fa-bc12-4888-a33b-933ff756530c",
"name": "Wait",
"webhookId": "486b1c68-6911-412a-89d2-fc4e791f9533"
},
{
"parameters": {
"method": "POST",
"url": "https://apigw.us-east-1.wrk-1.aws.hydra.verint.com/int/wa/v1/cloud-event",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ $json.v2_auth.token_type }} {{ $json.v2_auth.access_token }}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"source\": \"//iva/us-east-1/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 is inquiring about scheduling an order on their son's hemophelia medication.\",\n \"purpose\": \"Order Scheduling\",\n \"customerName\": \"Mr. David Campbell\",\n \"memberId\": \"902489671\",\n \"queue\": \"Order Scheduling\",\n \"timeInQueue\": \"3m 59s\",\n \"address\": \"456 Elm Street, Springfield, IL 62701\",\n \"language\": \"English\",\n \"lastContact\": \"4 days ago\"\n }\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-1312,
-1744
],
"id": "d83afb32-a0bb-41af-af5b-f8113156cee6",
"name": "Smart Transfer (1)",
"executeOnce": false,
"notesInFlow": true,
"notes": "Simulate Recorder Start Call Event"
},
{
"parameters": {
"method": "POST",
"url": "https://apigw.us-east-1.wrk-1.aws.hydra.verint.com/int/wa/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 Accredo to schedule delivery for his son's medication. Delivery was set for August 26. Clinical questions were answered satisfactorily, and payment was successful. 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": [
32,
-1744
],
"id": "64271f22-5758-4d49-a497-a6e6123ff0a5",
"name": "Summary",
"credentials": {
"oAuth2Api": {
"id": "issr2dcagkdcFCuZ",
"name": "Work Assist INT (v1) - internal"
}
}
},
{
"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\": \"Order Scheduling\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-864,
-1744
],
"id": "b3dc47fe-d671-43fc-b15c-6beb268cd4bf",
"name": "Order Scheduling",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "YynY08QotHPGCfC3",
"mode": "list",
"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": "2d43ff5d-8430-4837-843b-4ee9d0d29362",
"name": "Setup"
},
{
"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": [
-416,
-1744
],
"id": "379132af-4b5c-460f-944b-c5bb2837221d",
"name": "Payment Successful",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"resume": "form",
"formTitle": "Wait for Payment Success",
"formDescription": "Click Submit to signify payment was successful.",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-640,
-1744
],
"id": "f6fcaa3b-1595-4bbc-ad17-1984525555cc",
"name": "Wait for Payment Success",
"webhookId": "486b1c68-6911-412a-89d2-fc4e791f9533"
},
{
"parameters": {
"amount": 4
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-192,
-1744
],
"id": "65bbed2b-dce9-4fd5-980a-4e19d0143c52",
"name": "Wait for call to end",
"webhookId": "486b1c68-6911-412a-89d2-fc4e791f9533"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1376,
-1840
],
"id": "e8726355-7265-4e97-8b7c-3829746b93cc",
"name": "Sticky Note"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-32,
-1840
],
"id": "55d249cb-e4ff-4e4b-8518-89b5fda55deb",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-928,
-1840
],
"id": "575291f2-a98c-4d83-ad5e-3277051eae3a",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-480,
-1840
],
"id": "561e1991-2eba-4478-8581-ed3079299f75",
"name": "Sticky Note3"
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Setup",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Order Scheduling",
"type": "main",
"index": 0
}
]
]
},
"Smart Transfer (1)": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Summary": {
"main": [
[]
]
},
"Order Scheduling": {
"main": [
[
{
"node": "Wait for Payment Success",
"type": "main",
"index": 0
}
]
]
},
"Setup": {
"main": [
[
{
"node": "Smart Transfer (1)",
"type": "main",
"index": 0
}
]
]
},
"Payment Successful": {
"main": [
[
{
"node": "Wait for call to end",
"type": "main",
"index": 0
}
]
]
},
"Wait for Payment Success": {
"main": [
[
{
"node": "Payment Successful",
"type": "main",
"index": 0
}
]
]
},
"Wait for call to end": {
"main": [
[
{
"node": "Summary",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "a20bc7db-5d9b-460a-9a84-91dcbfbca4bf",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1d14171834eac77e3e796e3342933fbc57a33295e898b249017b9d12b57d9e0c"
},
"id": "YOTO8iUQP0sgZVHi",
"tags": [
{
"createdAt": "2025-08-12T04:26:36.130Z",
"updatedAt": "2025-08-12T04:26:36.130Z",
"id": "C5NhHOyZA61CPBqG",
"name": "Copilot"
},
{
"createdAt": "2025-08-22T21:56:39.613Z",
"updatedAt": "2025-08-22T21:56:39.613Z",
"id": "TYbLsrTtKRa2Vl4I",
"name": "Accredo"
}
]
}