I need a node that tells my workflow this:
if INBOUND is in the “direction” field, use the from phone number
if OUTBOUND is in the "direction field, use the to phone number
I don’t want seperate branches in the outcome, so I can’t use switch
the fields are already set, I just need something that changes one of the two phone numbers coming in to be THE phone number it uses from then on out in the workflow
To add to this. n8n also provides some functions to help Convenience methods | n8n Docs
The $if() does basically what the ternary operator does.
for example {{ $if($json.direction == 'INBOUND',$json.from,$json.to) }}