HTTP Action in Workflows

In HTTP action in IDN workflows , is there any way to send values dynamically in request body?We are trying to create serviceNow ticket through workflows.
as example(sample json):

 {
                "description": "Ticket Created from Workflow for ",
                "requested_for": "xxxxxxxxxx",
                "opened_by": "xxxxxxxxxxxxxxxxxxxx"
}

We are able to generate ticket but is there any way to put the values for “requested_for” / “description” dynamically? I have tried using $.trigger.identity.id but it is not working.

Thanks,
Gourab

Yes, you can accomplish this using inline variables. An example of how to use inline variable is as follows:

{
                "description": "Ticket Created from Workflow for ",
                "requested_for": "{{$.trigger.identity.id}}",
                "opened_by": "xxxxxxxxxxxxxxxxxxxx"
}
2 Likes

Hey @colin_mckibben This isn’t working for me. I am just trying out simple test workflow where I am trying to send identity id to webhook but I get below error while building workflow itself.

If I try “Enter Value” option with same body, it is not replacing variable

I see this thread where it says dynamic variable substitution is still not available in http action. Workflows: How to dynamically create request body in HTTP action
Can you confirm if this should work or not?

This is a known bug that our engineering team is working on. It should work with the way you configured it. I’ll update this thread once the fix is in place.

This should be fixed now.

Good morning.

The dynamic variable references do not appear to be working on my tennant.

“lastName”:“{{$.getIdentity.attributes.lastname}}”

Is there an issue with this? i’ve even tried changing the type of curly bracket by copy and pasting from on eof your other posts

Hi Adam ,
Can you please confirm , if Get Identity action is added to your workflow?if not then please add and check if variable is rendering the value.

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