Hello @v.annnps try using “Basic Auth” instead of “API Key”, place your api key in the “Username” field, and a “x” in the password field. See if that works for you.
Take care!
It didn’t, unfortunately. Any other suggestions?
Can you share with us the fields that you are passing in the body of the request? There are some mandatory fields that are required to create a freshservice ticket via the Freshservice API, just need to make sure we are hitting those requirements. Also I would try this in a tool like Postman to make sure you can successfully generate tickets via the API before using the workflow automator.
Let us know if you need any help with that process.
So, I’ll be honest I’m a bit of a beginner at this.
Our goal is to have a copy of an incident created when we update the agent category to a specific one.
I have the workflow automator set up so that when a ticket is updated to the specific category then the event should happen.
I’m stuck now on whether I should be using a Web Request or Triggering a Webhook?
Initially I was using a WebHook and after filling out the info used the Simple options to select the required fields. After it wasn’t working I even tried “All fields” and “All visible fields” but both returned a 400 error.
I also tried the advanced options to write a script following the info at https://support.freshdesk.com/en/support/solutions/articles/50000002311-create-a-new-child-ticket-automatically-using-a-webhook, though I know that’s mainly for freshdesk.
Finally I tried a WebRequest, first creating a GET request which appeared to be successful? But the POST request isn’t. I was using:
{
"description": "Child ticket for {{ticket.id}}",
"subject": "Child Ticket for {{ticket.id}}",
"email": "{{ticket.from_email}}" ,
"parent_id": {{ticket.id_numeric}},
"requester_id": {{ticket.requester.id}}
"phone": {{ticket.requester.phone}}
"priority": 1,
"status": 2,
"source" :1
}
Definitely a little out of my wheelhouse, so if you have any resources that would be useful for beginners too, I would appreciate it!
Hello,
When you use the webrequest node and run the test. what is the the error?
Do you have any mandatory fields ?
The error I receive:
{
"description": "Validation failed",
"errors": :
{
"field": "description",
"message": "It should be of type String",
"code": "missing_field"
},
{
"field": "status",
"message": "It should be one of these values: '2,7,8,9,12,5,6,10,3,4'",
"code": "missing_field"
},
{
"field": "subject",
"message": "It should be of type String",
"code": "missing_field"
},
{
"field": "priority",
"message": "It should be one of these values: '1,2,3,4'",
"code": "missing_field"
},
{
"field": "requester_id",
"message": "One of the following is mandatory: requester_id, phone, email",
"code": "missing_field"
}
]
}
Our only mandatory fields are Requestor, Status, Source, Priority, Subject, and Description.
Hello,
Is that was the body you sent you are missing a comma after "requester_id": {{ticket.requester.id}}
But then you should have received incorrect JSON.