We are trying to integrate with Joplin to have our notes trigger automation in NodeRed to save Web Clipper & Notes into our redmine project management systems.
Since Zapier is not supported we are focusing on the API, but don't really want to install NodeRed on the local computers so I'm wondering if Joplin Server has the API built-in so we can have NodeRed integrated with Joplin Server?
If the API is not in the Server, would a workaround be to run an instance of Joplin Client on our server and have it sync with Joplin Server installed on the same localhost with the Client? Once this was working, we should be able to access the API on the localhost.
joplin cli should be installed on the server side, at least it contains data api
@rxliuli Hmmm, I'm not sure how the CLI would be useful to collect the note information and pass it to another software API programatically. Am I missing something?
@laurent @florider I know you guys are busy and contribute so much time already, but I would like to see if you can help wth this project that I have been trying to complete for months to replace EverNote & Zapier. I'm really getting to the point I seems easier to go back to the Evernote/Zapier solution, but would prefer to support Joplin.
I personally do not find much real use case scenarios for using the Joplin App itself. Often times the last thing we need is yet another application to maintain data in. It is not like I'm constantly in Joplin editing notes and I'm curious how many people do actually use the Joplin App for editing and maintenance vs those who just use the Web Clipper to collect research from the internet.
The main benefit that I see is useful to people is the collection of notes using the Web Clipper, but the data gets stuck in Joplin App. Nothing is really actionable once in Joplin so the workflow stops.
I feel the data is more useful when it can be imported into existing applications that are more mature for project management and taking action.
Would you guys be able to offer advice how we can ultimately get Web Clipper Notes into our project management system programmatically?
joplin is currently known as a very open note-taking application
The CLI tool allows note access via an API. This would be the same as the workaround that you proposed in your first message, but the CLI is a lighter client then the desktop version.
From what I've observed (of forum users), the majority use Joplin as a note taking app primarily. Although for a decent chunk of users, web clipping is a core part of note taking. I'd say your use case is likely on the rarer side (you're the first I've seen) since it's not a workflow that Joplin was really designed for. You might find that a purpose-built tool like wallabag is easier to fit in to your workflow.
@rxliuli Awww, that looks good... I guess my question comes back to how to access the API but not on the local client PC.
This is where I'm trying to figure out how to access the API.
@CalebJohn Thanks for your clarification.
I did look at Wallabag and it seems to be a less active project, and I fear a little over simplified, but I'll give it more consideration for sure.
There's a set of Node-RED nodes (node-red-contrib-joplin) that use the Joplin API to enable search, update, delete, get attachment, get, getby parent, and create. I've dabbled in using it to enable Home Assistant to "self-document" it's configuration and/or state information about my home in Joplin. To me, the integration of Node-RED and Joplin creates some amazing capabilities.
Using the nodes, you can access the API of the Joplin instance running on a different machine. Joplin's API has a security "feature" that only allows access from the same machine, but you can work around that by using a proxy to mirror the API requests received from a remote machine so they appear to the API as a local request.
Here are my notes on the procedure that I used, if it's any use:
node-red-joplin-contrib Nodes to the Node-RED Pallette
- Launch Node Red
- From the menu, select Manage Pallette
- Select the Install tab
- In the Search Modules field, enter
- Click Install
Configure the Joplin Data API
- In Joplin, Tools - Options - Web Clipper
- If not already activated, activate the Web Clipper Service as it is required for the Jopln Data API to run.
- In the Web Clipper configuration section, copy your Authorization Token as it will be required to configure the Joplin Configuration node in Node-RED.
Configure Access to the Joplin Data API
The Joplin Data API listens on port 41184, but it only binds to 127.0.0.1 to accept traffic from the localhost only. Requests originating from other hosts will be refused. To circumvent this "security feature", implement a port proxy on the system hosting Joplin. The port proxy will listen for requests on a port other than 41184 from hosts other than the localhost and will retransmit the request to 41184 on the localhost.
For Windows 10, the built-in command,
netsh, can perform this function.
- To activate a port proxy to listen for requests from any host on port 41185 and retransmit them to 41184 on the localhost, execute the following command
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=41185 connectaddress=127.0.0.1 connectport=41184
- Open port 41185 on the firewall, if present. If using the built-in Windows Defender, this can be accomplished one of two ways:
Use netsh to add a new firewall rule:
netsh advfirewall firewall add rule name="Open Port 41185" dir=in action=allow protocol=TCP localport=41185
On modern Windows machines, this can also be done via PowerShell commands:
New-NetFirewallRule -Name JoplinAPI -DisplayName "JoplinAPI 41185" -Direction Inbound -Protocol tcp -LocalPort 41185 -Action Allow -Enabled True
To deactivate the port proxy:
- Execute the following command
netsh interface portproxy reset
- To close the previously opened firewall port either:
- Remove the firewall rule using netsh:
netsh advfirewall firewall del rule name="Open Port 41185"
- Remove the firewall rule using PowerShell:
Remove-NetFirewallRule -Name JoplinAPI 41185