In order to have an Automation Task executed directly from a ticket, you can link your Automation Service Workflow to a Ticket Process Workflow.
After you publish your Automation Workflow as a Service, you can connect the Automation Service to your ticketing process.
...
When a new ticket is created which is linked to an Automation Workflow, the tasks performed by Automation are updated into the Activity History section of the ticket. (This is true only if you design your Automation Workflow to execute an operation to update the worklog of your ISM ticket )