He created puppet states of Rhine confederation and sort of united Kingdom of Italy, was it a factor in birth of Italian/German national identities or nationalism and if so how big of a factor was it?
For Germany, the answer is a complex mixture of yes and no. It is important to realize that the Napoleonic interlude often reenforced preexisting intellectual and political trends. The Rheinbund's relative political weakness meant that it reenforced localism. There was some hope within German intellectual circles in 1805/06 that Napoleon would be a Charlemagne-like figure that would replace the old Reich with a modern entity, but the structure of the Rheinbund precluded this.
Although the Napoleonic Wars are often cited as an incubator of German nationalism- Thomas Nipperdey famously began his Germany from Napoleon to Bismarck: 1800-1866 with the line "In the beginning was Napoleon,"- recent historiography has shown there was relatively little nationalist agitation in evidence among the wider German public at the time. In fact, the Napoleonic regime in Germany often stimulated the opposite reaction. The smaller German states like Bavaria, Saxony, and Württemberg became much larger and their administration more efficient because of Napoleon's incessant demands for German money and bodies for his wars. These structural changes were not eliminated after Waterloo, and the polities that survived Napoleonic amalgamation process emerged in 1815 as much more durable state structures. Although this was certainly created discontent among intellectuals, there was in actuality relatively little nationalist volunteerism in Germany during the 1813 Wars of Liberation, Prussia being a notable exception. Often, the resistance to French rule was framed through local issues and metaphors, not a sense of greater Germany. Instead, the quartering of troops, the destruction of fortifications, and, quite importantly, the near destruction of the German economy due the Continental System created a sense that the local homeland (Heimat) was in danger. In the case of Hamburg, intellectuals and activists celebrated the Hanseatic past and the city's republican virtues as a counter to French rule. There was a marked revival of local cultural mores and institutions in the aftermath of the Napoleonic Wars. The German Romantics would often stress the unique nature of a locality's monuments and other facets of local identity. The strengthening of state authority also gave localism a boost as the state was better able to afford cultural patronage. The nineteenth century witnessed a rebirth in historical preservation and renewal, often with a local tinge to it. Napoleon's destruction of the Holy Roman Empire had an impact here as it allowed for feudalism to be romanticized and these projects to be presented a recovering a lost or distant past and making it relevant for the new era. Thus, German localism became in many important ways more entrenched because of the Napoleonic Wars, not eroded.
But as paradoxical as it sounds, localism is not necessarily antithetical to a greater sense of nationhood, as the German case shows. One of the cultural developments of the Enlightenment was the creation of an ever widening German cultural sphere in which Germans in various areas consumed many of the same cultural products and experiences. One particularly vivid example of this was in Goethe's Sorrows of Young Werther in which the two doomed protagonists "meet cute" and when one of them cannot form words, the other merely says "Klopstock," a poet contemporary to Goethe that was widely read. Germans increasingly were reading much the same literature, listening to similar music, and participating in the same intellectual debates. This cultural homogenization though often framed itself through local metaphors and did not view Germany's diversity and particularism as contradictory to the German nation, but rather a reflection of its true essence. Popular magazines that appeared in the 1850s, such as Die Gartenlaube presented Germany's diverse locales and customs as part and parcel of a German nation. Nor was this expanding cultural sphere just a matter of secularist modernization. The rebirth of German religiosity in the nineteenth century often had a highly universalist German character to it as many Catholics and Protestants sought to to develop a universal German Christendom, albeit one that suited their own particular confession.
These two trends, localism and cultural homogenization, could not necessarily create German political unification on their own. The strengthening of the multiple German states after 1815 prevented a type of bottom-up revolution from being carried out successfully to create a unified German political entity. The 1848 Revolutions exemplified this as once the various Kleinstaaten recaptured their footing, they were able to crush the various revolutionary groups rather swiftly.
Sources
Aaslestad, Katherine. Place and Politics: Local Identity, Civic Culture, and German Nationalism in North Germany During the Revolutionary Era. Leiden: Brill, 2005.
Berger, Stefan. The Search for Normality: National Identity and Historical Consciousness in Germany Since 1800. Providence: Berghahn Books, 1997.
_.Inventing the Nation: Germany. London: Arnold, 2004.
Confino, Alon. The Nation As a Local Metaphor Württemberg, Imperial Germany, and National Memory, 1871-1918. Chapel Hill: University of North Carolina Press, 1997.
Rowe, Michael. From Reich to State The Rhineland in the Revolutionary Age, 1780-1830. Cambridge: Cambridge University Press, 2003.