Improve conversation action template logic