Well, advanced to me. I’m looking to clean up some of the alerts that we pass through n8n to Matrix. In the case of our website monitoring platform, some of the fields it sends via webhook are empty unless the issue is resolved. So, as a basic example, we have something like this in our notifications:
resolved at {{$node["Webhook"].json["body"]["data"]["attributes"]["resolved_at"]}}
If the issue is new, “resolved_at” will have a value of null, whereas if it’s resolved, the value will be something like “2021-10-13T17:10:52.778Z”. What I’d like to be able to do is have the entire line starting at “resolved at” through to the end of the variable only display if “resolved_at” is not null. And I’d like to do it without a separate IF node, ideally. I’ve seen other posts in here about doing something similar around replacing the variable with another variable (thanks again for that @shrey-42) or replacing the variable with arbitrary text if it’s missing, but not exactly this. Thanks in advance!