Copied Pushover action not working

Hi, this is puzzling me: I copied the Pushover action false and conneted it with true and I edited the message. Pushover for false works flawlessly … for true it doesn’t work. It sais the workflow was executed but no 1 appears. On false the one appears.

And … I am not even testing the complete workflow … I’m just using the play button on the Pushover action.

Help!

grafik

It is sadly impossible to help you without more information. Please post the full workflow and also additionally the output of the Trigger-Node. We can then have a look.

Working PO Node:
Status 1, request 19d28594-6c76-4fb5-b63a-5802f4f83689
Failing PO Node:
Result: 0 - no data

As mentioned … I only press “play” on either of the Pushover Nodes.

Edit: I just realized that taking away the connection makes the Node work. So it has to do with the workflow :frowning:

{
  "nodes": [
    {
      "parameters": {
        "topics": "n8n-trigger",
        "options": {}
      },
      "name": "MQTT Trigger",
      "type": "n8n-nodes-base.mqttTrigger",
      "typeVersion": 1,
      "position": [
        580,
        300
      ],
      "credentials": {
        "mqtt": "ioBroker Mqtt"
      }
    },
    {
      "parameters": {
        "userKey": "removed",
        "message": "mqtt trigger true",
        "additionalFields": {}
      },
      "name": "Pushover",
      "type": "n8n-nodes-base.pushover",
      "typeVersion": 1,
      "position": [
        1070,
        280
      ],
      "credentials": {
        "pushoverApi": "Pushover"
      }
    },
    {
      "parameters": {
        "userKey": "removed",
        "message": "mqtt trigger false",
        "additionalFields": {}
      },
      "name": "Pushover1",
      "type": "n8n-nodes-base.pushover",
      "typeVersion": 1,
      "position": [
        1070,
        430
      ],
      "credentials": {
        "pushoverApi": "Pushover"
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{JSON.parse($node[\"MQTT Trigger\"].json[\"message\"])['message']}}",
              "value2": "true"
            }
          ],
          "boolean": []
        }
      },
      "name": "IF3",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        820,
        310
      ]
    }
  ],
  "connections": {
    "MQTT Trigger": {
      "main": [
        [
          {
            "node": "IF3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF3": {
      "main": [
        [
          {
            "node": "Pushover",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Pushover1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

I checked the mqtt messages … they are true/false.

You are treating them as “string” is it possible that they are true booleans instead? Because

true !== "true"

to be honest … I don’t understand the boolean settings … I would be looking for something like … if input = true then true else false … but I cannot identify/recognise anything like this.

Here the changed version of the workflow which instead of a string uses now the boolean option:

Thanks @jan
but it still doesn’t work.

I sent true/false from my iobroker but i only receive Pushover “false” messages (also on “true”)
Additionally I can still only use the play button on the Pushover “false” node - the “true” node does nothing.

I copied your Workflow 1:1 … just entered the User Key which I had formerly removed.

Something is fishy … I don’t know what :frowning:

In this case, it is best if you build a workflow that mocks the incoming data with a Function-Node and so demonstrates the problem. You can then post it here and we can have a look.

You overestimate my expertise … I am not a programer so I have limitations.

Then you can make a screenshot of the data the MQTT Trigger node outputs with JSON selected.

Even though I get those “false” messages … no data appears.

grafik

That can not be the case. If the node would not output any data it would not execute the IF node like shown in the screenshot of your first post.

I thought you would say that :wink:

What might I be doing wrong?

Edit: I changed the pushover message in the workflow and it didn’t update. I checked and only this one workflow is active. I am rebooting the VM now.

Edit_2: I had to change the message again … now it sticks. I also checked ioBroker … if the workflow is off the instance shows disconnected … if I turn it on it shows connected. Still no data :frowning:

Yes, that sounds correct. n8n only connects if either the workflow is active or if you are testing (so is active in the time between pressing “Execute Workflow” in the editor-UI and till it receives the first data, but it waits for max. 120 seconds).

If the workflow is active it will execute every time it receives data but you will not see it in the UI. Only if you are pressing “Execute Workflow” and you receive then a message will the data be displayed in the UI.

Ah … ok … now I executed the node … here’s the output … looks good doesn’t it?
Strange the if doesn’t work :frowning:

2

In this case your expression is wrong. What you have currently is:

{{JSON.parse($node["MQTT Trigger"].json["message"])['message']}}

So it says it should use the message property in message which does not exist. So it will always resolve to undefined and because both true and false are not undefined it will always be false.

So you have to change your expression to (as also the JSON.parse is not necessary as it is already an object):

{{$node["MQTT Trigger"].json["message"]}}

or even shorter because the data is the direct input-data of the IF-Node:

{{$json["message"]}}

it should then work fine. Here the fixed workflow:

Thank you @jan … it works!
Interestingly I can only toggle. So I cannot send two true in a row nor false. And what I also notice is that the state that is already present in the ioBroker object is immediately used when I start the workflow (probably normal).

Thanks again for your incredible patience.