For any non 7th chord: root, 3rd, extended note if applicable (2nd, 6th, add9, etc.)
For 7th and beyond chords: root, 3rd, 7th, extended note (9th, 11th, 13th)
There are chords where u have to play the 5th cuz it's the note being altered in the chord. But, for the most part, those notes above are the essential notes for any chord.