Skip to main content
InSource KnowledgeCenter

TN InSight017 Query AVEVA Insight History API using Node-RED and Email results



This article from InSource shows how to query AVEVA Insight and return process values using Node-RED and then send out an Email with the value(s).

  • Author: Ron Tanner
  • Published: 12/13/2019
  • Applies to: AVEVA Insight


Example Steps:

1.) Access your AVEVA Insight and click the “Insight Suite” in the upper right.

2.) Click the “Administration” icon


3.) Click the “REST API” on the “Integration Settings” tile.


4.) For this example, we will use Basic Authentication:  Copy the “Endpoint” URL


5.) For this example, Node-RED has been installed on a Windows 10.  You can download Node-RED from clipboard_e66449135530f08047beb611d32915e1a.png


6.) We will now create a simple Node-RED flow to query information from AVEVA Insight and send an Email with the current value from one of our tags.


7.) The “inject” node is used as a trigger to start the GET request.

8.) The “http request” node is used to call the AVEVA REST API.  The method we use will be “GET” and can be chosen using the dropdown box.  The URL is built starting with the URL from step 4 above along with different parameters which can be found in the AVEVA REST API documentation on the AVEVA Insight website.

The following URL GET’s the ProcessValue using the endswith filter option.  The example tag is “Baltimore.Labeler1.Performance”, 'Baltimore.Labeler 1.Performance')


9.) The “function” node is used to create the custom Email message:  The function node supports JavaScript and in our example, we concatenate the current date along with the process value we received from our GET query



10.)  The “email” node is used to send the Email.  In our example we used office365 to send the Email.



11.)  The “debug” node is used to test the flow.  You can click on the “inject” node tab which will start the flow.  You can also use the “inject” nodes “Repeat” option to have the inject run periodically.


12.) The resulting Email.  You can also customize the Email using HTML in the JavaScript code if desired.



Similar steps can be used with other 3rd party application to request tag values from AVEVA Insight.