Hello,
I am configuring a workflow and I need to send an HTTP request with a body in this workflow.
the first element of the body is a static string that I define, but the second element of the body is a list that is a variable we got from a previous workflow operation.
I have tried to create a body similar to the body created in this post Chained Workflows
The content of the $.hTTPRequest.body is too big to share here, but it is the result of a search query made to IDN that returns a list of account activity
I mentioned in my original post that I tried to have the body without the double quotes as you suggest but I still have an error.
the error is the following Unable to parse input as JSON, please ensure it is syntactically correct. (type: Error Parsing Input, retryable: false): invalid character 'm' looking for beginning of value
Apparently {{}} does not work as a placeholder for arrays in templating. (They can be used for single variables only) Using any variation of {{$.hTTPRequest.body}} inserts a text string that is in the format map[...] where ... is the actual content of the array. Also, every nested child array inside will also be prefixed with map. This is why you are getting the below error
I guess you will have to look for another approach.
PS: Please share your findings as this is a very interesting use case
Thank you for your answer. I was trying to look into an alternative by only sending the array in the body using the “choose variable” option and sending the information "application":"ApplicationA" in the request header as it is a static value that I define.
While I believe this can work easily in most cases it does not work for me as the receiving end on the HTTP request, is an external trigger of another workflow in IDN. And from what I tested I do not have a way of retrieving the headers from this trigger.
I am open for testing ideas and other methods of implementation if anyone can think of a possible solution.
A bad solution would be to create a new workflow with external trigger for each application but this is something we don’t want to do as we would be wasting our workflow limit in the environment