This paper presents a novel framework architecture for an online, real-time flexibility assessment and activation platform targeted at unlocking the flexibility potential of commercial buildings and smaller industrial sites, thereby enabling greater levels of renewable grid integration. Renewable integration targets in Europe of up to 40% of power generation from renewable sources by 2030 and over 90% by 2050 aim to decarbonize the electrical grid and increase electrification of transport, industry, and buildings. As renewable integration targets increase, participation in flexibility programs will be required from a much greater range of buildings and sites to balance grids hosting high levels of renewable generation. In this paper, an online implementation of a standardized flexibility assessment methodology, previously developed for offline contract negotiations between stakeholders, is modified to automate the assessment. The automated assessment is then linked to an aggregator-based multi-building or site optimization stage, enabling increased participation of multiple buildings and sites. To implement the assessment, models for individual flexible systems were reviewed, selected, and adapted, including physics-based, data-driven, and grey-box models. A review of optimization for flexibility found mixed-integer linear programming to be the optimal approach for the selection of flexible systems for demand response events.