I know that when the pronoun is used in place of the direct object, we use:
When the pronoun is used in place of the indirect object, we use:
Therefore if I want to say I told them I would say Yo los dije. According to google translate, the correct translation is Yo les dije.
If told is the verb and them is the direct object, why is that correct?