# Executing a node from an external website

**URL:** <https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292>\
**Category:** General\
**Tags:** http-request\
**Created:** [13 September 2023 21:55 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292 "2023-09-13T21:55:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoQuaresma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brunoquaresma/32/82804_2.png) [@BrunoQuaresma](https://discourse.nodered.org/u/BrunoQuaresma)\
**Post date:** [13 September 2023 21:55 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/1 "2023-09-13T21:55:18Z")

</div>

Hey folks!

I'm developing a web system and I want to execute a Node-RED node from this app so I'm wondering if the Node-RED API provides something to help me with that.

I have a flow that contains a button and a "Modbus Write" node and my goal is to trigger the "Modbus Write" node from an external HTTP request so I can use the Node-RED as a "back-end" and this web system as the user interface.

Any thoughts? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 September 2023 22:18 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/2 "2023-09-13T22:18:16Z")

</div>

Why not simply use Node-RED as an API server? Then call the API endpoint from your web system.

---

<div class="post-metadata">

**Author:** ![BrunoQuaresma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brunoquaresma/32/82804_2.png) [@BrunoQuaresma](https://discourse.nodered.org/u/BrunoQuaresma)\
**Post date:** [13 September 2023 22:51 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/3 "2023-09-13T22:51:01Z")

</div>

How can I do that?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 September 2023 23:08 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/4 "2023-09-13T23:08:03Z")

</div>

At its simplest, you can use an http-in/-out pair of nodes to define the API endpoint. You feed whatever you want to return to the calling system into the http-out. The flow is triggered by the calling system referencing the endpoint defined by the http-in.

In your web system, you can use a Fetch call assuming you have reasonably up-to-date browsers using the system.

---

<div class="post-metadata">

**Author:** ![BrunoQuaresma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brunoquaresma/32/82804_2.png) [@BrunoQuaresma](https://discourse.nodered.org/u/BrunoQuaresma)\
**Post date:** [13 September 2023 23:24 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/5 "2023-09-13T23:24:39Z")

</div>

Awesome! I'm going to take a look into these nodes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 September 2023 23:24 UTC](https://discourse.nodered.org/t/executing-a-node-from-an-external-website/81292/6 "2023-09-27T23:24:51Z")

</div>

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