# Node Red Watson Discovery Node

**URL:** https://discourse.nodered.org/t/node-red-watson-discovery-node/16655
**Category:** General
**Created:** [13 October 2019 14:03 UTC](https://discourse.nodered.org/t/node-red-watson-discovery-node/16655 "2019-10-13T14:03:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kabonker](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kabonker](https://discourse.nodered.org/u/kabonker)
#### Post date: [13 October 2019 14:03 UTC](https://discourse.nodered.org/t/node-red-watson-discovery-node/16655/1 "2019-10-13T14:03:39Z")

</div>

I set up a node red flow for Watson Assistant.. It was simple and worked well, had an input with an inject node, then a watson assistant node and a debug output. Easy.

Then I went to set up the same pattern for the Discovery Node and zammo. nothing. It appears the same set up sends a "blank" query to Watson Discovery services and I get back just a default documents as if i sent an empty Natural Language Query.

I am using the Interactive flow diagrams, so I just drag them over. When I look at any details, I cannot see anything specific to wire up the Inject text into the query.

What am I missing, I also could not find a step by step on youtube for discovery. there was a nice one for watson assistant.

Also there did not seem to be any specific documentation on the .org for node red? On how do do this simple call?

Thank you for the help.

---

<div class="post-metadata">

### Author: ![miker256](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miker256/32/13042_2.png) [@miker256](https://discourse.nodered.org/u/miker256)
#### Post date: [13 October 2019 19:35 UTC](https://discourse.nodered.org/t/node-red-watson-discovery-node/16655/2 "2019-10-13T19:35:53Z")

</div>

> **[watson-developer-cloud/node-red-labs](https://github.com/watson-developer-cloud/node-red-labs/tree/master/basic_examples/discovery)**
>
> Node-RED labs on the use of the Watson Developer Cloud services - watson-developer-cloud/node-red-labs

> **[To submit a query to Watson Discovery through node-red](https://developer.ibm.com/answers/questions/396537/to-submit-a-query-to-watson-discovery-through-node/)**
>
> A loaded keyword is saved into msg.payload and want to use that keyword as a query in the Watson Discovery. So far, I could not "connect" the Function node to the Watson Discovery. How can I connect each other and pass a keyword as a query? See the...

---

<div class="post-metadata">

### Author: ![kabonker](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kabonker](https://discourse.nodered.org/u/kabonker)
#### Post date: [14 October 2019 01:21 UTC](https://discourse.nodered.org/t/node-red-watson-discovery-node/16655/3 "2019-10-14T01:21:35Z")

</div>

Thanks but I found a simple example. All I had to do was add this code in a function node before the call to discovery..

msg.discoveryparams = {};

msg.discoveryparams.nlp\_query=true;

msg.discoveryparams.query=msg.payload;

return msg;
