Wir danken dir, Gott, wir danken dir, BWV 29 by Johann Sebastian Bach


''', is a sacred cantata by Johann Sebastian Bach. He composed it in Leipzig in 1731 for , the annual inauguration of a new town council, and first performed it on 27 August of that year. The cantata was part of a festive service in the . The cantata text by an unknown author includes in movement 2 the beginning of Psalm 75, and as the closing chorale the fifth stanza of Johann Gramann's "". Bach scored the work in eight movements for four vocal parts and a festive Baroque orchestra of three trumpets, timpani, two oboes, strings, an obbligato organ and basso continuo. The organ dominates the first movement Sinfonia which Bach derived from a Partita for violin. The full orchestra accompanies the first choral movement and plays with the voices in the closing chorale, while a sequence of three arias alternating with two recitatives is scored intimately.

Bach used the music from the choral movement for both the and of his Mass in B minor.