Thank you @MutedJam
I solved it with some info plus this solution from @jan
I will let the workflow node for the community on here, let me know if it’s right the way I copied.
I’d like it to look like with graphic way and move it to Tips and Tricks.
Dialogflow and Google Calendar with Webhook Response
{
“meta”: {
“instanceId”: “91d2d6c5d1971543d6e4e7f3fc1a445192a3a0de2db90de9e2a7daa42162d0a2”
},
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “f912b54f-67e8-47af-9d6b-2e96b004d4bb”,
“responseMode”: “lastNode”,
“options”: {}
},
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
-1760,
-40
],
“webhookId”: “d80e66d7-6c02-44ae-9fd1-c207bb963625”,
“id”: “724e3c92-5af2-4ddb-a9e0-b38d749c5135”
},
{
“parameters”: {
“functionCode”: “return [\n {\n json: {\n "fulfillmentMessages": [\n {\n "text": {\n "text": [\n $json.text\n ]\n }\n }\n ]\n }\n }\n];”
},
“name”: “Response to Dialogflow”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
-660,
-40
],
“id”: “23ab48bb-38de-46ee-829c-99e9190f8ed7”
},
{
“parameters”: {
“values”: {
“string”: [
{
“name”: “text”,
“value”: “={{ $json["body"]["queryResult"]["outputContexts"][0]["parameters"]["nombre"] }}, gracias por la informacion. Te confirmo tu {{$json["body"]["queryResult"]["outputContexts"][0]["parameters"]["motivo"]}} para el {{ $json["body"]["queryResult"]["outputContexts"][0]["parameters"]["hora"] }}”
}
]
},
“options”: {}
},
“name”: “Set Confirmation”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
-1560,
-40
],
“id”: “5711d0a3-a414-48ad-bb45-2c46c941ad82”
},
{
“parameters”: {
“functionCode”: “return [\n {\n json: {\n "fulfillmentMessages": [\n {\n "text": {\n "text": [\n $json.text\n ]\n }\n }\n ]\n }\n }\n];”
},
“name”: “Response 1”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
-1380,
-40
],
“id”: “9eb55194-1dee-47b1-881e-9374a00f002c”
},
{
“parameters”: {
“values”: {
“string”: [
{
“name”: “Hora”,
“value”: “={{ $node["Set Confirmation"].json["body"]["queryResult"]["outputContexts"]["0"]["parameters"]["hora"] }}”
},
{
“name”: “Motivo”,
“value”: “={{ $node["Set Confirmation"].json["body"]["queryResult"]["parameters"]["motivo"] }}”
},
{
“name”: “Nombre”,
“value”: “={{ $node["Set Confirmation"].json["body"]["queryResult"]["parameters"]["nombre"] }}”
}
]
},
“options”: {}
},
“id”: “294dc727-bec3-4eca-b5f9-036672941d04”,
“name”: “Set info for Calendar”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
-1200,
-40
]
},
{
“parameters”: {
“calendar”: {
“__rl”: true,
“value”: “ea9f557d8364c20d2f995c07a4[email protected]”,
“mode”: “list”,
“cachedResultName”: “Test”
},
“start”: “={{ DateTime.fromISO($json.Hora).toISO() }}”,
“end”: “={{ DateTime.fromISO($json.Hora).plus({hours: 1}).toISO() }}”,
“additionalFields”: {
“attendees”: [],
“description”: “={{ $json["Motivo"] }}”,
“summary”: “={{ $json["Nombre"] }}”
}
},
“id”: “658419e8-ff9a-44ac-8076-e914bd7c9d1d”,
“name”: “Create Appointment”,
“type”: “n8n-nodes-base.googleCalendar”,
“typeVersion”: 1,
“position”: [
-1020,
-40
],
“credentials”: {
“googleCalendarOAuth2Api”: {
“id”: “2”,
“name”: “Google Calendar account”
}
}
},
{
“parameters”: {
“keepOnlySet”: true,
“values”: {
“string”: [
{
“name”: “text”,
“value”: “={{ $json["summary"] }}, tu {{$node["Webhook"].json["body"]["queryResult"]["outputContexts"][0]["parameters"]["motivo.original"] }} para {{ $node["Webhook"].json["body"]["queryResult"]["outputContexts"][0]["parameters"]["fecha.original"] }} a las {{ $node["Webhook"].json["body"]["queryResult"]["outputContexts"][0]["parameters"]["hora.original"] }} ha sido confirmada.”
}
]
},
“options”: {}
},
“id”: “a575726f-a37e-451b-9cb2-4ccdf53176aa”,
“name”: “Extract Info from Calendar”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
-840,
-40
]
}
],
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “Set Confirmation”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set Confirmation”: {
“main”: [
[
{
“node”: “Response 1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Response 1”: {
“main”: [
[
{
“node”: “Set info for Calendar”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set info for Calendar”: {
“main”: [
[
{
“node”: “Create Appointment”,
“type”: “main”,
“index”: 0
}
]
]
},
“Create Appointment”: {
“main”: [
[
{
“node”: “Extract Info from Calendar”,
“type”: “main”,
“index”: 0
}
]
]
},
“Extract Info from Calendar”: {
“main”: [
[
{
“node”: “Response to Dialogflow”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}