I have a workflow that assigns a contact to a user using a PUT request, which works fine. I need to create contacts in GHL. I copied the Assign Workflow and changed some things around to make it a POST request to create the contact, but keep getting permission errors, despite having the same settings as the Assign Workflow. I’ve done everything suggested and it still won’t work.
What is the error message (if any)?
Any combination of “Forbidden - maybe check your permissions?” “Authorization failed - please check your credentials" -Invalid JWT”
Please share your workflow
Contact Creation Workflow
<{
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "146996a4-e0c2-4728-8e0a-146e38083345",
"responseMode": "lastNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
1072,
9056
],
"id": "9e1c4ba7-79a1-4e73-8dd6-9ad0a71c376f",
"name": "Webhook",
"webhookId": "146996a4-e0c2-4728-8e0a-146e38083345"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "7",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "6e244682-0153-46ed-8739-8213bc19ec60"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Apex"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "00111497-b7a8-4b29-a774-d8d21649c87b",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "28",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "DSA"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "b85d4a2f-920e-4d8b-9a68-723638097486",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "23",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "LFG Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "56bc49a7-e817-4e5c-b3ea-7596ee57f0ca",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "8",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "LIFT Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "c21ebed5-5d13-423f-b19b-e18ee9823c7c",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "10",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "ST6 Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4347f5a4-496f-4769-b7cf-68a7a792e6ca",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "29",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Patriots Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "d25acaae-c0f1-4594-8109-464b821fd264",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "4",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "ELA Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "49f1e1f0-cd75-4aa0-bf8d-e2cc018aa930",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "41",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "MIA Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4ff3c402-fe35-4f58-816f-d20a24e443aa",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "12",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Slocumb Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "86386b1f-50c0-4a77-91bf-d92fda318ce8",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "7",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Republic Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f18e8c5b-71fb-48f1-ae80-52bff353e1ba",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "24",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "SCG Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f7176cac-ad58-4c88-808d-04ea3fc7fdf0",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "3",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Nationals Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "12d44a12-9ab5-46d5-a710-4e114914fd99",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "11",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Leland Assign"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "42032bfd-a32e-4c56-95db-831dac789d51",
"leftValue": "={{ $json.body.SubAccountID }}",
"rightValue": "2",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Chatt"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.3,
"position": [
1296,
8864
],
"id": "844c1ffd-5174-4cb7-916f-f680a923a8c1",
"name": "Switch"
},
{
"parameters": {
"method": "POST",
"url": "https://services.leadconnectorhq.com/contacts/",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "highLevelOAuth2Api",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "version",
"value": "2021-07-28"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"name\": \"{{ $json.body.name }}\",\n \"email\": \"{{ $json.body.email }}\",\n \"phone\": \"{{ $json.body.phone }}\",\n \"address1\": \"{{ $json.body.StreetAddress }}\",\n \"city\": \"{{ $json.body.City }}\",\n \"state\": \"{{ $json.body.State }}\",\n \"postalCode\": \"{{ $json.body.PostalCode }}\",\n \"country\": \"{{ $json.body.Country }}\",\n \"assignedTo\": \"{{ $json.body.UserID }}\",\n \"locationID\": \"{{ $json.headers.locationid }}\",\n \"customFields\": [\n {\n \"key\": \"Age\",\n \"value\": \"{{ $json.body.Age }}\"\n },\n {\n \"key\": \"DateofBirth\",\n \"value\": \"{{ $json.body.DateofBirth }}\"\n },\n {\n \"key\": \"ContactSource\",\n \"value\": \"{{ $json.body.ContactSource }}\"\n },\n {\n \"key\": \"SpouseName\",\n \"value\": \"{{ $json.body.SpouseName }}\"\n },\n {\n \"key\": \"SpouseAge\",\n \"value\": \"{{ $json.body.SpouseAge }}\"\n },\n {\n \"key\": \"HobbyInterest\",\n \"value\": \"{{ $json.body.HobbyInterest }}\"\n },\n {\n \"key\": \"County\",\n \"value\": \"{{ $json.body.County }}\"\n },\n {\n \"key\": \"Beneficiary\",\n \"value\": \"{{ $json.body.Beneficiary }}\"\n },\n {\n \"key\": \"ServiceType\",\n \"value\": \"{{ $json.body.ServiceType }}\"\n },\n {\n \"key\": \"LeadID\",\n \"value\": \"{{ $json.body.LeadID }}\"\n },\n {\n \"key\": \"ReceivedDate\",\n \"value\": \"{{ $json.body.ReceivedDate }}\"\n },\n {\n \"key\": \"AssignedDate\",\n \"value\": \"{{ $json.body.AssignedDate }}\"\n },\n {\n \"key\": \"LeadImageURL\",\n \"value\": \"{{ $json.body.LeadImageURL }}\"\n },\n {\n \"key\": \"AssignedAgent\",\n \"value\": \"{{ $json.body.AssignedAgent }}\"\n }\n ]\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1520,
10304
],
"id": "d2b5797f-8036-4044-a505-a60e079934ed",
"name": "Chatt Assign",
"retryOnFail": true,
"waitBetweenTries": 3000,
"credentials": {
"highLevelOAuth2Api": {
"id": "EiaNFYoD6vY18li6",
"name": "Chatt CPO"
},
"highLevelApi": {
"id": "XozXH7rcyUNas4iL",
"name": "HighLevel account 2"
},
"httpBearerAuth": {
"id": "mor2LVNZ7yImyfr8",
"name": "Chatt CPO Contact Create"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
{
"node": "Chatt Assign",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "412eb08870b12d209cbabf87f0b5ff8684984e1138d81517675a709dace0cad5"
}
}>