She was clever, so she wasn't tricked by him.

Literal

She [topic-は] clever was [because-ので] him [by-に] was-not-tricked.

ので provides the causal connection: being clever prevented her from being tricked. だまされなかった is the negative passive of だます ('to trick, deceive'). The passive frames her as the target of the attempted deception.