Conditions in expressions not work with multiple triggers. how to handle!?

basically i have 2 trigger with 2 different json im using the edit field after this 2 to standardize the output, i have try with $if() without just and || but returning always null field i dont understand what im missing


Information on your n8n setup

  • **n8n version:1.68
  • **Database (default: SQLite):Postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker/Coolify
  • **Operating system:Linux

hello @mredodos

you should put the question mark ? after the field, which may or may not be in the payload. The field $json will always present :slight_smile:

E.g.
{{ $json.body?.post.post_type || $json.type }}

But best approach is to add a label for each trigger and use it as a reference:

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.