Get AI summaries of any video or article — Sign up free
Using the Logseq API and Make.com to hook it and Notion together. thumbnail

Using the Logseq API and Make.com to hook it and Notion together.

Tools on Tech·
5 min read

Based on Tools on Tech's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Make.com can’t directly access a laptop-hosted Logseq instance because inbound connections are blocked by firewalls and security settings.

Briefing

Lockseq can be wired into Notion through Make.com, but the hard part isn’t the API calls—it’s getting Make.com (running in the cloud) to reach Lockseq (running on a local laptop) without exposing insecure ports. The workflow demonstrated creates a Notion page, then appends multiple lines into a Lockseq page, using a “migrated” checkbox in Notion to control which items get processed.

The central obstacle is network reachability. Make.com can’t access a laptop directly because firewalls and security keep local services off the public internet. A common workaround is ngrok, which tunnels a local HTTP port (in the demo, Lockseq on port 12315) to a public URL so Make can call it. That approach works for testing, but it has drawbacks: the first-time warning screen requires a paid ngrok plan to remove, and the public address changes when the tunnel restarts—forcing updates to Make’s configuration.

For a more stable setup, the demo switches to a VPS-based reverse tunnel. A secure shell (SSH) reverse tunnel connects from the VPS back to the laptop’s Lockseq port, keeping the laptop service reachable only through the encrypted path. The demo emphasizes a key security detail: binding the tunnel to localhost on the laptop side. If the tunnel were bound broadly (e.g., “all interfaces”), it could expose an unencrypted port that makes it easier to obtain authorization keys and abuse the API.

On the VPS, nginx handles HTTPS and routes incoming requests to the tunnel target. The configuration uses a domain (logseqtools on tech.com) with Let’s Encrypt certificates via certbot, and it forces HTTP-to-HTTPS redirection so the Lockseq API never travels unencrypted over the internet. Once this is running, disconnecting the SSH tunnel produces a “bad gateway,” confirming that the API access depends on the secure tunnel.

With connectivity solved, the Make.com portion becomes straightforward API orchestration. The scenario starts by querying a temporary Notion database for rows where migrated is false—useful for debugging because toggling checkboxes controls which records get processed. Make then calls Lockseq’s API to create a page using an authorization token and a page name taken from Notion. After creation, Make reads the returned page identifier and fetches up to 100 lines of content.

Finally, Make appends blocks/lines to the Lockseq page using an “append block in page” endpoint. Each appended line includes a newline character so entries don’t stack incorrectly. The demo loops over the Notion content lines, sending repeated API requests to Lockseq and capturing partial responses so the returned JSON can be inspected during troubleshooting.

The result is a repeatable pipeline: Notion items marked for migration trigger Lockseq page creation and block appending, while the migrated checkbox prevents reruns. The demo also points to broader use cases—using Lockseq as a central idea capture point and distributing structured content across tools like Todoist and Notion—so long as the API access remains secure and stable.

Cornell Notes

The workflow connects a local Logseq instance to cloud automation in Make.com so Notion data can create and update Logseq pages. The main challenge is that Make.com can’t reach a laptop directly due to firewalls, so a tunnel is required. ngrok can work for quick tests, but it changes URLs and shows warnings unless paid. For longer-term use, the demo uses a VPS with nginx for HTTPS plus an SSH reverse tunnel back to the laptop’s Logseq port, with localhost binding to avoid exposing an insecure API. Once connectivity is stable, Make.com queries Notion rows where migrated is false, creates a Logseq page via the API, then appends multiple blocks/lines to that page using the returned page ID.

Why can’t Make.com call Logseq running on a laptop directly, and what are the two tunneling approaches shown?

Make.com runs in the cloud, while Logseq runs on the user’s laptop. Firewalls and security settings prevent inbound connections to the laptop’s local ports, so Make can’t reach Logseq over the public internet. The demo first uses ngrok as a mediator: it forwards the laptop’s local HTTP port (Logseq on port 12315) to a public ngrok URL that Make can call. For a more durable solution, it switches to a VPS-based setup: nginx on the VPS provides HTTPS, while an SSH reverse tunnel connects from the VPS back to the laptop’s Logseq port, allowing encrypted access without exposing the laptop directly.

What security risk does the demo warn about when configuring the SSH tunnel, and how is it mitigated?

The risk is accidentally exposing an unencrypted or broadly reachable API endpoint. If the reverse tunnel binds to something like “all interfaces” rather than localhost, an attacker could potentially reach the Logseq API directly and try to use or extract authorization keys. The mitigation is to bind the tunnel to localhost on the laptop side (the demo stresses the importance of the localhost parameter). That way, only the VPS-to-laptop encrypted tunnel path can reach the Logseq port.

How does nginx + Let’s Encrypt fit into the architecture?

nginx on the VPS terminates HTTPS and routes requests to the Logseq API endpoint reachable through the SSH tunnel. The demo uses a domain (logseqtools on tech.com) and configures proxy_pass to the local tunnel target (again using localhost). certbot (Let’s Encrypt) issues certificates, and nginx forces HTTP requests to redirect to HTTPS so the Logseq API is never accessed unencrypted over the internet.

How does the Make.com workflow decide which Notion records to process during debugging?

Make.com queries a Notion database for items where migrated is false. This acts like a control switch: during testing, the user can toggle the migrated checkbox to include or exclude specific rows. That prevents repeated processing loops and makes it easier to iterate on the API calls without constantly creating new Notion entries.

What sequence of Logseq API calls does Make.com perform to build the page content?

First, Make calls Logseq’s API to create a page, passing an authorization token and a page name derived from Notion. The API response includes a page identifier. Next, Make uses that page ID to append blocks/lines to the page using an endpoint like append block in page. Each appended block includes the text content (with newline characters such as “/n” in the demo) so multiple lines appear as separate entries.

Why does the demo mark items as migrated, and what problem does it prevent?

Marking migrated prevents the same Notion rows from being processed again on subsequent runs. Without that, Make would repeatedly loop through the same items—potentially appending duplicate content to the same Logseq page multiple times, especially when there are multiple text lines to process.

Review Questions

  1. Compare ngrok and the VPS + SSH reverse tunnel approach in terms of stability, security, and operational overhead.
  2. In the Make.com flow, where does the Logseq page ID come from, and how is it used in later API calls?
  3. What role does the migrated checkbox play in preventing duplicate processing, and how does it help debugging?

Key Points

  1. 1

    Make.com can’t directly access a laptop-hosted Logseq instance because inbound connections are blocked by firewalls and security settings.

  2. 2

    ngrok is useful for quick testing but is less suitable for long-term automation due to URL changes and first-time warning screens unless using a paid plan.

  3. 3

    A VPS with nginx for HTTPS plus an SSH reverse tunnel provides stable, encrypted access to the laptop’s Logseq port.

  4. 4

    Binding the SSH tunnel to localhost on the laptop side reduces the risk of exposing an unencrypted or publicly reachable API endpoint.

  5. 5

    Make.com can query Notion for rows where migrated is false to control which items get processed during debugging.

  6. 6

    The automation flow typically creates a Logseq page first, then appends multiple blocks/lines using the returned page identifier.

Highlights

The demo’s core fix isn’t an API trick—it’s network plumbing: secure, stable access from Make.com to a local Logseq service.
ngrok works immediately for testing, but the changing public URL and warning screen make it a poor fit for repeatable automation.
The VPS + nginx + SSH reverse tunnel approach keeps the laptop’s Logseq port reachable only through an encrypted path.
Using a Notion migrated checkbox turns the pipeline into a controllable, debuggable batch process.

Topics

Mentioned

  • SSH
  • VPS
  • API
  • JSON
  • HTTP
  • HTTPS