Software-defined networking (SDN) is a cornerstone of next-generation networks and has already led to numerous advantages for data-center networks and wide-area networks. However, SDN is not widely adopted in constrained networks, such as Wireless Sensor Networks (WSN), due to excessive control overhead, lossy medium, and in-band control channels. Therefore, a key challenge to enable Software-Defined Wireless Sensor Networks (SD-WSN) is to reduce the number of control messages required to configure the data plane. In this paper, we propose a cluster-based flow control approach in hybrid SDNs. Our approach is hybrid in the sense that it takes advantage of distributed legacy routing and centralized SDN routing. In addition, it makes a trade-off between the granularity of flow control and the communication overhead induced by the SDN controller. The approach partitions a network into clusters with minimum number of border nodes. Instead of handling the individual flows of each node, the SDN controller only manages incoming and outgoing traffic flows of clusters through border nodes, while the flows inside each cluster are controlled by a distributed legacy WSN routing algorithm. Our proof-of-concept implementations in both software and hardware show that our approach is efficient with respect to reducing the number of nodes that must be managed and the number of control messages. In comparison to benchmark solutions with and without clustering, our solution reduces communication costs for flow configuration in an SD-WSN at least by 27% and at most by 88% respectively, without degrading packet delay nor delivery rate.