Actually, I think the issue is a little different and might be with slack template itself.
I tried to delete the # section and it still gave me an error:
template: build_release_push.yaml:50: function “build” not defined
We do not use Drone cloud, we implemented drone at our cluster so unfortunately I cannot share a link. But it happend to me while trying to run a templated pipeline with the step provided above
@natali the pipeline template feature uses the Go template language. The {{ and }} are reserved keywords in the Go template language. If you need to include {{ and }} in your pipeline template, they would need to be escaped, in accordance with the Go template escaping rules.