Recorded in 1968(I think) by Kenny Rogers and the First Edition, written by Mickey Newbury. Song is called, “Just Dropped in to see what Condition My Condition was In”.
You nailed it first...