The assembly of artificial nanostructured and microstructured materials which display structures and functionalities that mimic nature's complexity requires building blocks with specific and directional interactions, analogous to those displayed at the molecular level. Despite remarkable progress in synthesizing "patchy" particles encoding anisotropic interactions, most current methods are restricted to integrating up to two compositional patches on a single "molecule" and to objects with simple shapes. Currently, decoupling functionality and shape to achieve full compositional and geometrical programmability remains an elusive task. We use sequential capillarity-assisted particle assembly which uniquely fulfills the demands described above. This is a new method based on simple, yet essential, adaptations to the well-known capillary assembly of particles over topographical templates. Tuning the depth of the assembly sites (traps) and the surface tension of moving droplets of colloidal suspensions enables controlled stepwise filling of traps to "synthesize" colloidal molecules. After deposition and mechanical linkage, the colloidal molecules can be dispersed in a solvent. The template's shape solely controls the molecule's geometry, whereas the filling sequence independently determines its composition. No specific surface chemistry is required, and multifunctional molecules with organic and inorganic moieties can be fabricated. We demonstrate the "synthesis" of a library of structures, ranging from dumbbells and triangles to units resembling bar codes, block copolymers, surfactants, and three-dimensional chiral objects. The full programmability of our approach opens up new directions not only for assembling and studying complex materials with single-particle-level control but also for fabricating new microscale devices for sensing, patterning, and delivery applications.