Wireless sensor networks consist of many tiny sensor nodes which are deployed in various geographical locations for sensing the normal spectacles and also to transmit the collected information to the base station which is also named destination node through multiple nodes present in the network. Most of the existing heuristics algorithms used for finding the optimal routes have limitations in the provision of effective solutions for routing and clustering mechanisms in larger search spaces. Hence, when the search space increases exponentially, the chance of creating the optimal solution for clustering and routing is decreasing and ultimately an un-optimized process depletes the sensor node resources. In order to address the challenges and limitations present in the existing routing systems, two new heuristics algorithms namely gravitational approach based clustering method and a clustered gravitational routing algorithm have been proposed in this paper for providing an optimal solution for efficient clustering and effective routing. Moreover, a fuzzy logic based deductive inference system has been designed and used in this work for selecting the most appropriate nodes as cluster head nodes from the nodes present in each cluster. The simulation results obtained from this work show that the clustering accuracy and the network lifetime are increased and the energy consumption as well as delay are reduced with the application of these proposed algorithms. © 2020, Springer Science+Business Media, LLC, part of Springer Nature.