There is no way Putin saw this happening. I am sure he accounted for some sanctions but no doubt assumed Europe's reliance on gas would not interfere with his plans. Instead he's basically pushed the world into fast tracking energy dependency away from Russia.
I really hope EU/NATO can rally around and support each other to overcome some of these difficulties - it is one of the ways we can show strength against tyranny.