Building automation enables the possibility of energy flexibility in buildings. To investigate the motivation and barriers for the energy flexibility in buildings, this study develops a conceptual framework of the readiness for energy flexible buildings by conducting interviews with building automation suppliers, electricity supplier, district heating supplier, distribution system operator, energy service companies, experts in energy and buildings, building managers, and occupants. The two main parts of the framework are building preparation, grid and market conditions following the impacts of regulation and policies, stakeholder collaboration and integrated building automation. A case study of campus buildings is conducted to demonstrate the framework. The result of the case study shows that the main barriers for buildings to provide energy flexibility are 1) many buildings are too old and need to be refurbished, 2) the benefit of providing energy flexibility to the grid is not sufficient, 3) building management systems need to be either installed or upgraded to response to the demand from the grid. Building managers believe that buildings can provide energy flexibility by building automation and distributed energy resources, but they consider energy efficiency to be more important than providing flexibility to the grid. Meanwhile, occupants have different opinions regarding the comfort level of indoor air quality and control, and the differences are based on various factors, e.g. location, room type, and building ages. Background 'The energy flexibility of a building is the ability to manage its energy demand and generation according to local climate conditions, user needs and grid requirements' (Jensen et al. 2017a). A large part of the energy use of buildings may be shifted in time, and significantly contribute to increasing flexibility in the energy system (Jensen et al. 2017b). Buildings can provide flexibility to the energy system in various ways, e.g. load shifting and HVAC (heating, ventilation, and air conditioning) control, and participate in two types of DR (demand response) programs: explicit and implicit demand response. Implicit DR assumes that electricity consumers may alter their electricity consumption due to a price signal that is provided at a different time (Mandatova and Lorenz 2013). Meanwhile, explicit DR is divided into traditional-based (e.g. direct load control, interruptible pricing) and market-based (e.g. emergency demand response programs and ancillary services) (Sebastian and Margaret 2016).