Padmasambhava is revered across the Himalaya as Guru Rinpoche, the precious teacher, and in the Nyingma school as a second buddha. The gap between what can be documented about him and what is told about him is one of the widest in the history of religion, and both sides of it are worth stating plainly.
What the early record supports. The Testament of Ba, in versions dating from perhaps the ninth to the twelfth centuries, associates him with the founding of Samye, Tibet's first monastery, under King Trisong Detsen, who reigned from 755 to the end of the century. The Dunhuang manuscripts, which are early and independent, mention a tantric master named Padmasambhava associated with kilaya rituals who tames demons. Crucially, they do not connect him to Trisong Detsen. So the early witness knows the name and the ritual specialism but not the national-founder role. His historical existence was questioned by earlier Tibetologists and is now cautiously accepted.
What came later. In the eleventh and twelfth centuries several parallel narratives circulated about who had brought Buddhism to Tibet, featuring Padmasambhava, Vimalamitra and Vairotsana, and Padmasambhava's did not initially dominate. Nyangral Nyima Ozer, 1124 to 1192, wrote the Zangling-ma, the earliest full biography. Orgyen Lingpa, 1323 to about 1360, elaborated further, introducing the eleven deeds in the Padma bka' thang of 1352. By the end of the twelfth century his account had displaced the others.
The developed life has him born from a lotus in Oddiyana as an eight-year-old, subduing the gods and spirits of Tibet one by one and binding them under oath as protectors, taking twenty-five chief disciples, and concealing terma to be recovered by prophesied revealers in later centuries.
Scholars working this material include Sam van Schaik, Jacob Dalton and Lewis Doney.