Hello,
I was recently given the task to build a Workflow in Freshservice that can set and remove Roles for Agents. Trigger for this should be a specific Service Request being raised.
Currently I am having trouble with adding this new role to the existing role array. Here are the relevant parts of my Workflow
- First I use the API to get the Agent details that include their roles
- Then I use the following parser node (narrowed down to the attributes I need)
But then I have the problem of how to add the new role
{ "role_id": 53000134485, "assignment_scope": "entire_helpdesk", "workspace_id":2 }
to the existing array that I can then write back.
Expression Builder is not usable for my Use case, since outputting any String with the Expression Builder turns every double quote inside the String into a single quote
And the Web Request body only accepts double quotes since this is the JSON standard.
With Liquid alone I wasn’t able to find a way to insert this new role into the the Array (also tried handling the role array as full String but also did not work).
Does anyone have an idea on how I could try to implement this, or is it just not possible due to the limitations the Workflow builder and Liquid have? If needed I can also share the Liquid methods I tried with.