Community detection is one way to reduce the complexity of analyzing networks, especially with their rapid growth. Dividing networks into communities can help analysts and experts to understand the behavior and function of the networks. Also, besides the community structure, finding the influential nodes to spread information in the networks is a critical issue for researchers. Community detection is a challenging topic in network science and, various methods have been proposed for that. Many methods that find community structure use modularity as a measure to qualify the strength of community structure. These methods try to find community structures based on maximizing modularity. Modularity maximization is an NP-hard problem. One of the approaches that could solve such problems is approximate algorithms. Identifying the influential nodes which has many applications in complex networks can also be used in community detection. Therefore to maximize the modularity, in this paper, we first try to identify influential nodes, and then by estimating their influence domain, the communities are detected. We used scale-free networks concepts to prove the approximate factor. Experiments on real-world networks show that the proposed algorithm can compete with the state-of-the-art methods in community detection algorithms. In addition, our proposed method also identifies the most influential node within each community.