Analyze the melody you wish to apply to a progression of triads. Determine what key the melody is in before continuing. Look at the first and last note of the melody, if they are the same, then the music probably starts in the key of the starting note. Look at the accidentals in the melody to compare them to established key signatures. Use a combination of the starting pitch and the accidentals to determine the key.
Write a tonic triad, which is a triad that starts on the first scale degree, under the first note of the melody.
Add additional triads by using the melody as a guide. If there is a C in the melody, then only three triads may be used: triads starting on C major or minor, A minor and F major or minor. The triad has to have one of the notes from the melody to make sense.
Add a dominant triad in the penultimate measure. The dominant triad helps to create the sound of a cadence. Build a tonic by creating a major chord on the fifth scale degree, regardless of whether the piece plays in major or minor.
End the triad progression by ending on the tonic on the first beat of the last measure of the melody. This ensures a complete ending that sounds resolved.