I’m receiving JSON via a Webhook from Clockify that looks like this.
[
{
"headers":{
"connection":"Keep-Alive"
},
"params":{
},
"query":{
},
"body":{
"id":"112233445566",
"description":"Now I explain some that other thing again.",
"userId":"12345678",
"billable":true,
"projectId":"98765432",
"timeInterval":{
"start":"2021-04-07T15:00:52Z",
"end":"2021-04-07T15:01:37Z",
"duration":"PT45S"
},
"workspaceId":"1232567898",
"isLocked":false,
"hourlyRate":null,
"costRate":null,
"customFieldValues":[
],
"project":{
"name":"Ticket 4209 - Not so Clever Admin [4066632296]",
"clientId":"",
"workspaceId":"1232567898",
"billable":true,
"estimate":{
"estimate":"PT0S",
"type":"AUTO"
},
"color":"#00BCD4",
"archived":false,
"clientName":"",
"duration":"PT0S",
"note":"",
"activeEstimate":"NONE",
"timeEstimate":{
"estimate":0,
"type":"AUTO",
"resetOption":null
},
"budgetEstimate":null,
"id":"5658785125",
"public":true,
"template":false
},
"task":null,
"user":{
"id":"12345678",
"name":"Clever Technician",
"status":"ACTIVE"
},
"tags":[
]
}
}
]
Separately, I have a Set with two values in it:
Name: Clever Technician
Value: 56234
Name: Stupid Technician
Value: 62134
What I want to do is compare [“user”][“name”] from the Webhook against the two values in my Set and return the value from the match. Then I’m going to use that value later in my workflow to update my PSA with the information from Clockify. Thank you!