Which of these would be right:
''Ils nous ont dit''
''Ils nous ont dits''?
I'm wondering because ''nous'' is an indirect object here rather than direct (I think), and likewise for a sentence like ''Je leur ai dit'' (or ''dits''? Not sure)
Indirect objects don't cause agreement when they come before the verb (the 'preceding indirect object'), so it is indeed "Ils nous ont dit" / "Je leur ai dit".
By the way, you know it's indirect because it's direà quelqu'un, and it's the introduction of a preposition that makes the object indirect.