Zendesk Custom Fields

Hi there, is there a solution now to have access to the custom fields of Zendesk ?
Reading is possible but i want to add the entrys.
image

Or does i need to set it via HTTP Request ?

Thanks,
Stefan

Do not think that it is possible right now but @RicardoE105 will know more and can maybe add support.

@jan it’s not possible yet. But will add today @Stefan.

1 Like

@Stefan Just sent a pull request adding the custom fields. You gotta turn the JSON parameters field to true and the custom fields field will show up. There you add the JSON corresponding to the type of custom field you want to set. Since to do so you would need the id I added the ability to list all the fields on the system so that you can grab it easily from there.

Regards.

1 Like

Hi Ricardo,

i have been made a http Request direct to the API.

It works.

Ricardo, do you know how i can upload attachments to zendesk ?

Like this: i have tried with a http request but it need a binary upload.
curl “https://{subdomain}.zendesk.com/api/v2/uploads.json?filename=myfile.dat&token={optional_token}”
-v -u {email_address}:{password}
-H “Content-Type: application/binary”
–data-binary @file.dat -X POST

How i can use thos in n8n ?
Thanks,
Stefan

Hey @Stefan the example below should do it. However, you gotta wait for the next release of n8n in order to use it as while I was doing this example for you I found an issue with sending binary data. I will send a pull request in a bit fixing that issue. As always @jan will let you know when is released.

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://i.pinimg.com/originals/c3/24/d9/c324d97149d572b1efbe7a2d37fc86dc.jpg",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://{yourdomain}.zendesk.com/api/v2/uploads.json?filename=c324d97149d572b1efbe7a2d37fc86dc.jpg",
        "responseFormat": "string",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "raw"
        },
        "sendBinaryData": true,
        "headerParametersJson": "{ \"content-type\": \"applciation/binary\" }"
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        740,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Forgot to mention, please stay on topic. This topic was about the Zendesk custom fields and the last question is about Zendesk uploads. Next time create another topic. Thanks

The fix for sending binary data got released with [email protected]

Jan,
since the last 2 Updates i get an error with Http Node.
How can get with the Docker Image to a older Version ?

ERROR: body must be a valid JSON

Error: body must be a valid JSON
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest.node.js:642:31)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:555:37)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:370:62
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:442:15
    at /usr/local/lib/node_modules/n8n/node_modules/p-cancelable/index.js:61:11
    at new Promise (<anonymous>)
    at new PCancelable (/usr/local/lib/node_modules/n8n/node_modules/p-cancelable/index.js:31:19)
    at WorkflowExecute.processRunExecutionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:296:16)
    at WorkflowExecute.run (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:59:21)
    at WorkflowRunnerProcess.runWorkflow (/usr/local/lib/node_module

Thanks,
Stefan

With Version 0.60 it works !

Beware: Its when i use the Raw Mode

What are you sending in the body? @Stefan

I have made rollback and it works !
My Request is SOAP XML Query. You have private mail.

Very sorry @Stefan for the issue.

Just released [email protected] which should fix that bug.