Triggering a node-red flow from Mendix

2
Hi, I want to trigger a node-red flow using a button from Mendix. I am running my node-red locally (locahost:1880). If I’m not wrong, this involves using the Call Rest service action in a microflow. However, I am not sure about what I should put in the location field, and as of right now I do not need to send any data with this button, just to trigger the flow. Thanks
asked
2 answers
1

Hi Alif,

 

This really depends on how the documentation from the node-red perspective describes how to trigger it through REST. The location field should be the end-point that you are calling. So that is the BaseURL + the extension for the service you want to call. 

 

More about how to call REST services from Mendix can be found here: https://docs.mendix.com/howto/integration/consume-a-rest-service/

answered
0

If you are running on localhost you can only call the node red service if you are running Mendix on the same machine. 

You are probably just running over HTTP if you are running everything locally, so in the Location field you probably just want something like

http://localhost:1880/hello

Where “hello” is the name of the end point Node Red is listening on.

Hope this helps and good luck with your project.

answered