I need to create a custom airflow operator which I should be able to use in airflow template(Written in python) which is running in cloud composer...
If I create custom airflow operator how can I use it in a template which is running on the cloud(how to make it available for everyone so that they can use that operator)
You need to use Airflow Plugins. https://airflow.apache.org/plugins.html
Airflow has a simple plugin manager built-in that can integrate external features to its core by simply dropping files in your $AIRFLOW_HOME/plugins folder. The python modules in the plugins folder get imported, and hooks, operators, sensors, macros, executors and web views get integrated to Airflow’s main collections and become available for use.
Take a look at examples here: https://github.com/airflow-plugins