Hey Everyone,
New to Freshservice and working with the workflow automator. I have a situation where when new requesters send their first ticket request, their new user account get a value for the “Department” field, but not the custom “Company” field I added. So, I have a workflow that checks if a ticket is raised, if the “Company” field is blank, update it to match the “Department” field, and then assign it to an agent group.
I can’t query for an individual agent group with the FreshService API but I can query for individual departments, so I added a custom Department field called “assigned_agent_group_id”, and populated it with the correct agent group ID. Then I added a Web Request node to my workflow that queries the department that matches {{ticket.department}} and used a JSON Parser node to get the response body. This is good, the JSON contains the agent group ID I assigned to a department (using the custom field). However, when I add another Web Request node to the workflow to update the ticket, the request is changing the value of the agent group ID that was listed in the JSON parser node, and I don’t know why.

Above is what the request to the department API endpoint looks like for this custom field.
The image below is a variable I added to the JSON parser node to extract just the ID value from the response body, because for some STUPID reason, the parser node always returns individual values inside arrays instead of just the value.

The group ID looks correct. The image below is the body sent to the tickets API endpoint, using that custom variable I added to the JSON parser node:

The image below is from the execution logs page for this workflow. The group_id value is completely different from the actual agent group ID.

Does anyone know why this is happening? Thanks
- Jack C