Townsend succeeded Vern Cotter in the Scotland hotseat in May and will take charge of his first game as an international boss when they welcome Samoa to Murrayfield on November 11.
The former fly-half built a reputation as an attacking coach when guiding Glasgow Warriors to the Pro12 title in 2015, and Townsend believes that Guardiola's methods will help the team both offensively and in defence.
"Defence and work-rate defines winning teams. I believe people watch Guardiola's attack more than his defence. But his teams at Barcelona had a rule to win back the ball. They started at seven seconds, and then it went down to three seconds," Townsend told BBC Sport.
"I visited Barcelona a few years back, and they had drills [to make sure] as soon as the ball was lost they were pushing so hard to get that ball back. What we see is those three great passes and the goal to win 7-2. What we don't see is how they got the ball in the first place. Defence is linked to the attack.
"You've got to build a game plan that helps you win games, that's what the players want. If the laws of the game and the strength of the personnel meant [you could win through] kicking and defending, then I would probably - reluctantly - do that. But the strength of the Scottish team is work-rate, energy, speed. The laws just now have opened up to help attacks, so attack is a massive part of winning games."
Scotland will also host New Zealand and Australia next month.