Could i run code in webhook?

I wanna send a HTTP request with a token.
But the token need to be gotten from another request, because it will change after some time.

So,Could I run some code in webhook?
like:
"params" : { "token" : "{{JSON.parse(Net::HTTP.get('a.com','/cgi-bin/token?xxx'))['token']}}" }

A watch supports multiple inputs, using the chained input type. This would allow your watch to run the ES query, and reach out to an external system to retrieve the current token. Then you can just template in the token in the webook.