@girish Maybe you can help me understand the API documentation. Below what I'm trying to set up: A n8n form that will give people the option to enter an address to either add or remove it from the list. However I'm struggling to understand what the payload should look like for the web hook request:
{
"nodes": [
{
"parameters": {
"formTitle": "Change List",
"formFields": {
"values": [
{
"fieldLabel": "E-Mail",
"fieldType": "email",
"placeholder": "E-Mail@tld.onl",
"requiredField": true
},
{
"fieldLabel": "Action",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "+"
},
{
"option": "-"
}
]
}
}
]
},
"responseMode": "lastNode",
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
140,
240
],
"id": "ce3e3e25-8d70-420b-aaae-48acd5dc3bad",
"name": "On form submission",
"webhookId": "290cb5dc-0f99-42a2-b3e9-32d9ef27761c"
},
{
"parameters": {
"method": "POST",
"url": "https://my.tld.onl/api/v1/mail/domain/lists/test",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "members",
"value": "={{ $json.Action }} [{{ $json['E-Mail'] }}] "
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
400,
240
],
"id": "d223c671-6340-416a-affa-12966a42b2d3",
"name": "HTTP Request1",
"credentials": {
"httpHeaderAuth": {
"id": "swkFIAxjlW7JU6oB",
"name": "my.tld.onl API"
}
}
}
],
"connections": {
"On form submission": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}
```",
"requiredField": true
},
{
"fieldLabel": "Handlung",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "+"
},
{
"opttld.onlion": "-"
}
]
}
}
]
},
"responseMode": "lastNode",
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
140,
240
],
"id": "ce3e3e25-8d70-420b-aaae-48acd5dc3bad",
"name": "On form submission",
"webhookId": "290cb5dc-0f99-42a2-b3e9-32d9ef27761c"
},
{
"parameters": {
"method": "POST",
"url": "https://my.tld.onl/api/v1/mail/domain/lists/test",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "members",
"value": "={{ $json.Action }} [{{ $json['E-Mail'] }}] "
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
400,
240
],
"id": "d223c671-6340-416a-affa-12966a42b2d3",
"name": "HTTP Request1",
"credentials": {
"httpHeaderAuth": {
"id": "swkFIAxjlW7JU6oB",
"name": "my.tld.onl API"
}
}
}
],
"connections": {
"On form submission": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}