What are the steps to have the output of an event command included in an alert e-mail?

I’ve been reading through the docs and I’m just not getting it. I have an EventCommand, “pull-vcenter”, which runs a python script to grab some configuration details for an alarming virtual machine. How do I include the output of that script in an alert?

The EventCommand is disconnected from the service state so you will need to send back a status update to a service, via REST API, at the end of your python script. Icinga2 Api - Icinga 2