Accessing Dispatch Payload in a Template

Hello!

I have a parametrised job which expects a JSON in its payload. I know I can write the payload to a file with dispatch_payload , but I need the data in that payload in a template. I would like to be able to do a jsondecode(base64decode(payload)) in the template. I cannot use the file("dispatch_file.json") because it’s not available at dispatch time.

As far as I can tell, the payload is also not provided to the runtime as an environment variable, although I haven’t tried this.

The only things I can think of are:

  1. to wrangle the file in my template somehow
  2. to pass the payload as a metadata field of stringified json

Both of these seem like the wrong way to do it., since I have the payload in the dispatch itself.

Any suggestions?