Cannot read property 'type' of null webhook

There was a problem running the workflow:
Cannot read property ‘type’ of null

{"code":404,"message":"The requested webhook \"GET b8e0bc35-5fab-4202-be53-bb003727b6f5/webhook\" is not registered.","hint":"The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)","stack":"ResponseError: The requested webhook \"GET b8e0bc35-5fab-4202-be53-bb003727b6f5/webhook\" is not registered.\n    at ActiveWorkflowRunner.executeWebhook (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:94:23)\n    at async /usr/local/lib/node_modules/n8n/dist/src/WebhookServer.js:47:24"}


There was a problem running the workflow:
Cannot read property ‘type’ of null

no modulo de webhook do mautic em modo de produção parace esse erro, alguem sabe como posso resolver ?

this my workflow

{
  "nodes": [
    {
      "parameters": {
        "fieldToSplitOut": "Object",
        "options": {}
      },
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "typeVersion": 1,
      "position": [
        770,
        330
      ],
      "continueOnFail": true
    },
    {
      "parameters": {
        "functionCode": "// Code here will run only once, no matter how many input items there are.\n// More info and help: https://docs.n8n.io/nodes/n8n-nodes-base.function\n\n// Loop over inputs and add a new field called 'myNewField' to the JSON of each one\nfor (item of items) {\n  item.json.map=> 1;\n}\n\n// You can write logs to the browser console\nconsole.log('Done!');\n\nreturn items;"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        540,
        330
      ]
    },
    {
      "parameters": {
        "events": [
          "mautic.lead_post_save_update",
          "mautic.lead_post_delete",
          "mautic.lead_post_save_new"
        ]
      },
      "name": "Mautic Trigger",
      "type": "n8n-nodes-base.mauticTrigger",
      "typeVersion": 1,
      "position": [
        310,
        330
      ],
      "webhookId": "b8e0bc35-5fab-4202-be53-bb003727b6f5",
      "credentials": {
        "mauticApi": {
          "id": "10",
          "name": "Mautic account 2"
        }
      }
    }
  ],
  "connections": {
    "Function": {
      "main": [
        [
          {
            "node": "Item Lists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mautic Trigger": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hey @egnine_team,

Is the workflow marked as active on the top right?

yes, it’s marked, I’ve been trying to solve this problem for 3 days.

You may have tried it already but does it happen on all workflows or just this one? To get the error does it happen on save or when you click Execute Workflow as well?

only when I run the workflow manually, just without the flow yesterday there’s the mautic

I wonder if there is a problem with that node then, Does it work anyway when you make your changes in mautic?

Hi @egnine_team, I gave this a quick go on my end against the hosted Mautic version offered by Try Campaign Studio: Sandbox | Acquia and could activate the workflow as well as execute it manually. It created the respective webhooks in Mautic (under Settings > Webhooks) and removed them again when disabling the workflow (or stopped its execution):

Does any webhook URL show up for you in Mautic when you either run your workflow manually or try activating it?

the mautic trigger after I created the access credentials, it creates an automatic webhook inside my mautic, but it is only visible when I manually activate wordflow

And activating the workflow is the step when you get the error message? That’s really odd - can you confirm your n8n version as well as the environment variables you have set?

I can’t understand the problem,

when I run the no mautic triguer manually → no mautic and generate an event → the mautic triguer receives the data correctly.

Now when I leave the flow active and not manually activate the mautic trigger it does not return any data.

So you can activate the workflow? Data sent to the production webhook URL would not appear in the n8n canvas (this only happens for test runs when manually executing your workflow). To inspect it, you would first need to save the execution data (in your workflow settings). You can then view previous executions through the respective option in the left sidebar:
image

In my execution list screenshot above it shows an error, but that’s coming from the function. The actual trigger is working fine:

the workflow returns success - but the mautic’s no data doesn’t arrive, it’s empty as in the image I made above.

Is there by any chance a second trigger node hidden somewhere on your canvas? I am asking because your last screenshot shows the workflow has been initiated by a webhook, whereas your previous screenshot suggests no incoming webhook arrived on the Mautic Trigger node.

Would you be able to create a new workflow from scratch, add a single Mautic trigger manually and nothing else, just to see if that works?

I created a new stream just with mautic

when I send a test message and the flow is manually active, the node receives the test data.

but when I leave the flow active and update the contact in mautic it the no of the mautic does not receive any data.

I am honestly baffled as to what could cause this. Even when sending a POST request to the production webhook URL with no data the trigger would still generate the item. In no scenario I tested would the workflow run, but the trigger showing 0 items as it does on your screenshot:
image

So to further understand this we’d need to reproduce the problem. Could you share your n8n version as well as the environment variables/configuration file (without any secrets like passwords of course)? How are you running n8n (operating system, docker etc.) and are you hosting it behind some kind of reverse proxy/firewall/anything else that might interfere with the traffic?

I was able to find it, when I click on the folder it shows me the data received, but in the main stream it doesn’t show any data. How can I proceed with the flow?

1 Like

Oh, so your workflow does receive data? That’s a great step forward :tada:

Building out your workflow works best when manually executing it once (so you have the test data available) while you can edit the workflow. So my suggestion would be to execute the workflow manually and then make the changes in Mautic triggering the event you are looking for.

You might want to take a look at this short video recorded by @maxT where he adds a trigger to his workflow. It’s for n8n.cloud and he’s using a GitHub trigger node rather than a Mautic one, but the basic idea is the same. Execute the workflow manually once and then build out the workflow based on the data received by the trigger.

I can only see the data when I click on the imagam folder I sent.
I can’t see the data in real time?

You can see the live data coming in when manually executing the workflow through the Execute Workflow node at the bottom of your screen. On a technical level, this will register a temporary webhook in Mautic. Performing any trigger-action in Mautic will then send data right to your canvas.

When your workflow is simply active and running in the background, this data would not available to manipulate live in your canvas.

ah… great, so that was my doubt. then i can put a stream to a google spreadsheet that the webhook data will be written in sequence.