Querying a list of keywords against other nodes

Hello,

I have a question, what would be the most efficient way to 1) store a list of keywords say

apple
cat
dog
www[.]dog[.]com
www[.]cat[.]com
etc

and then when running an HTTP API query, check the output for mentions of said keywords and then maybe trigger something e.g telegram message?

Its a vague idea, and I will be building on it, just wanted thoughts?

Hey @RedPacketSec!

I would use the Set node for this. In the Name field I would store apple, cat, dog, etc, and in the Value field I would store information that is relevant to that value and usable in the workflow. This blog post might help you better understand.

No say i have an API query and in the outpuit in json in one of the objects it mentions www[.]cat[.]com .

How do i get any one of the keywords to trigger a hit and msg for example?

"object": {
                "id": "xxxxxxxxx",
                "title": " something about animals",
                "source": "xxxxxxxxxxxxxx",
                "snippet": "very interesting article about www[.]cat[.]com and maybe even apples",
             },
             {
                "id": "xxxxxxxxx",
                "title": " something www[.]apple[.]com",
                "source": "xxxxxxxxxxxxxx",
                "snippet": "who says apples are good for you. lots of text..blah",
             },

so it can be anywhere in the objects, just need to trigger on a match if that makes sense?

Right off the top of my head, I would do something similar to this:

The Google Sheets node loads all the keywords to be compared.

The HTTP node retrieves the array of objects with id, title, source, and snippet.

In the function node, you can access the HTTP node’s output with items and access the keywords with $node["Google Sheets"].json.

With that info, then you can make a loop and then check for the matches.

Nice i’ll give it a try.

can you show me the code you are using in function node?

There is not code, it’s just a mockup.