Purpose: To analyse the relationship between environmental dynamism and Supply Chain Flexibility (SCF); and to evaluate if two dynamic capabilities, i.e. Operational Absorptive Capacity (OAC) and Organisational Learning (OL), are necessary competences for firms to develop such a responsive supply chain strategy as flexibility. Design/methodology/approach: Hypothesised relationships are tested with survey data from 302 Spanish manufacturing firms using structural equations modeling. Findings: Environmental dynamism is positively associated with both OAC and OL; and both dynamic capabilities enable SCF. We also find that the relationship between environmental dynamism and SCF is partially mediated by both dynamic capabilities. Research implications: The study contributes to the literature, for example, by determining when it is advantageous to develop SCF; by specifying what capabilities a firm needs to develop to align SCF with the environment; and, by opening the black box that is the relationship between the environment and SCF. Practical implications: Managers should develop SCF via OAC and OL when they detect a high degree of environmental dynamism. Knowing when this is necessary relies on a good understanding of the environment. OAC is found to be a stronger enabler of SCF than OL. The findings provide managers with an insight into why some firms are able to develop more effective responses to dynamic environments than others. Originality/value: One of only a limited number of studies to adopt a dynamic capabilities approach to supply chain management. Prior literature has shown dynamic capabilities can aid in developing strategic, structural, and operational flexibility. We extend this literature by showing that OAC and OL have an effect on SCF.