Pass build hook payload string as argument to build command?

Is there a way to pass the build hook payload string as an argument to the build command?

For instance:

  • My build command is: build site
  • build takes the parameter --color=
  • My build hook passes a hexadecimal colour as its payload, e.g. f45e42
  • How can I get to executing build site --color=f45e42?
  • (Optional, because I trust the source of the build hook: How can I sanitise the payload first?)


I don’t think so. But maybe you can use environment variables?

Seems possible with the INCOMING_HOOK_BODY environment variable described here:

You could try build site --color=process.env.INCOMING_HOOK_BODY? Please let us know how it goes!