Social interactions are important for how societies function, conferring robustness and resilience to environmental changes. The structure of social interactions can shape the dynamics of information and goods transmission. In addition, the availability and types of resources that are transferred might impact the structure of interaction networks. For example, storable resources might reduce the required speed of distribution and altering interaction structure can facilitate such change. Here, we use Camponotus fragilis ants as a model system to examine how social interactions are impacted by group size, food availability, and food type. We compare global- and individual-level network measures across experiments in which groups of different sizes received limited or unlimited food that is either favorable and cannot be stored (carbohydrates), or unfavorable but with a potential of being stored (protein). We found that in larger groups, individuals interacted with more social partners and connected more individuals, and interaction networks became more compartmentalized. Furthermore, the number of individuals that ants interacted with and the distance they traveled both increased when food was limited compared to when it was unlimited. Our findings highlight how biological systems can adjust their interaction networks in ways that relate to their function. The study of such biological flexibility can inspire novel and important solutions to the design of robust and resilient supply chains.