Traffic flow on networks requires knowledge on the behavior across traffic intersections. For macroscopic models based on hyperbolic conservation laws there exist nowadays many ad-hoc models describing this behavior. Based on car trajectory data we propose a novel framework combining data-fitted models with the requirements of consistent coupling conditions for macroscopic models of traffic junctions. A method for deriving density and flux corresponding to the traffic close to the junction for data-driven models is presented. Within the models parameter fitting as well as machine-learning approaches enter to obtain suitable boundary conditions for macroscopic first and second-order traffic flow models. The prediction of various models are compared considering also existing coupling rules at the junction. Numerical results imposing the data-fitted coupling models on a traffic network are presented.