nostr:npub1r0d8u8mnj6769500nypnm28a9hpk9qg8jr0ehe30tygr3wuhcnvs4rfsft

Hi there. I've added a Trigger node into nostrobots, which is still an experimental feature, so you can try it out.

Right now I'm only creating triggers for mentions npub, but I'd like to add more features if I get feedback.

https://github.com/ocknamo/n8n-nodes-nostrobots/pull/26

Reply to this note

Please Login to reply.

Discussion

Wow, great. I'll absolutely use it. Can I ask how it works— Does it keep a websocket open or some other method?

I'll update my workflows later this week.

Of course, this is a method to keep WebSocket open.

Hi! I have started using your trigger node and it works well for kind 1 notes, with thanks.

I am working a lot these days with other kinds. For example, I am working on the MCP/DVM work, and I would like to be triggered by kind 5910 and 6910.

Also, I would spend a lot of my time chatting with the AI on a private relay using Flotilla which uses kind 9.

Can we make kinds configurable, with default 1, but able to enter any kind I choose?

Yap, Of course it is possible.

However, the current trigger node is triggered by mentions, i.e., filtered by p-tags.

This is both a precautionary measure to prevent too many events from reaching n8n.

Therefore, we need to know more to make a better spec. is there a tag on kind 5910, 6910, 9? Is there a NIP on this?

Your current mentions method will be good I think, the same method works for all kinds that I have seen; the mentioned user is tagged with "p" tag.

Kinds within the 5000-7000 range are defined with NIP-90. Within NIP-90 "p" tag defined as:

"p: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job"

That's the kind of mention I'm looking to work with.

https://github.com/nostr-protocol/nips/blob/master/90.md

Thanks, looks good.

Would it be useful if the p tag could be free-entered?

I think in your current UI setup you request the user input the npub, and that in the backend is used to specify the filter "#p":["hex pubkey"] ...?

I think that works great.

I would only need another field, similar to the current "Write" node layout, where you request the user input the Kind, with default to 1.

I use that a lot to write other kinds like 7 (reactions), 5910 (DVM request), 9734 (zap request), etc.

I got it. What you need is the ability to change the kind of Event to be Triggered.

I think that would work well for kind7,9. I don't have a deep understanding of the other kind, but in any case we need the ability to change the target kind of Trigger.

Awesome! You move quick. I will give it a go!

Tested and working on kind 7 (like) and kind 5910 (DVM request)! Thanks for the awesome fast response.

Will put to work soon.

Some bugs:

- I have a Nostr trigger set to trigger on mentions of kind 5910. It does so AND also it triggers on kind 1, whereas I was expecting it would only trigger on kind 5910.

- Periodically the Nostr trigger will stop working, it will start working again if the workflow is set to Inactive and reset to Active.

Thank you. 🫂

My question about the latter is, is it possible to get the logs of the node just before the workflow was stopped?

Possibly the relay is unstable.

I will see what I can find!

たぶんなおりました! Please check v1.1.5.

https://github.com/ocknamo/n8n-nodes-nostrobots/releases/tag/1.1.5

I have changed the health check method to make sure it returns an Event for a {limit:1} filter.

If the relay you are using does not support this, you may need to consider another method.

incorrect: "you may"

correct: "I may"

I mean, or an advanced version "raw filter" like you provide in the current Read node.