Using liquid filters in Web Request

Hello, I’m trying to make a dynamic JSON body to make a workflow more compact.
I see that Freshservice supports Liquid Filters and I was wondering if it was supported the use of “if”, “elsif” tags in the Web Request module.
I tried a few times, but it seems not possible, or am I using the wrong syntax?

For testing, I’m trying to create a body in function of the value of the ticket subject.


This gives me no option to give a value to the ticket subject and I receive the body with default answer in my webhook.
image

In this other test, I changed the body to this
image
And I receive the same body as before.

Is this some kind of unsupported tag or will it work, but I can’t test it?

Hey @Michele,
I’ve shared this query with the Freshservice team who can help you better.

Hello @zach_jones_noel , thank you, if I find a solution, I’ll let you know.

Once you use a placeholder (like ticket subject) in a Liquid expression, you can’t fill the placeholder while testing anymore. It seems the system doesn’t recognize the placeholder since it lacks the double curly braces or because it is part of the Liquid expression. The only way to test this is to actually run the Workflow and look at its output and logs.

2 Likes

Hello @chrism ,
it’s working as you said. This is the body.


And these is what I receive if I change the subject.
image
image
image

Thank you!

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.