metisnote

Metis notes in n8n: search and read pages, add pages, and find, add, change or delete database rows. A trigger starts workflows when pages or rows change.

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0
Author: Metis

Documentation

n8n-nodes-metisnote

Metis notes in n8n: two nodes, Metis and Metis Trigger, so you don't have to wire HTTP Request nodes by hand.

(The npm name n8n-nodes-metis belongs to an unrelated product, so this package is n8n-nodes-metisnote.)

Install

Self-hosted n8n: Settings → Community nodes → Install, enter n8n-nodes-metisnote, tick the box and install.

From a local build instead (Docker):

npm run build && npm pack                     # makes n8n-nodes-metisnote-<version>.tgz
docker cp n8n-nodes-metisnote-*.tgz <n8n-container>:/tmp/
docker exec -u node <n8n-container> sh -c 'mkdir -p ~/.n8n/nodes && cd ~/.n8n/nodes && npm install /tmp/n8n-nodes-metisnote-*.tgz'
docker restart <n8n-container>

Credentials

In Metis, open a team workspace, then Settings → Integrations → New integration. Connect the pages it may reach, tick Can add and change pages and rows if it should write, and copy the key.

In n8n, make a Metis API credential:

  • Integration Key: the metis_… key.
  • Server URL: https://app.metisnote.com unless you run your own Metis server.
  • Signing Secret: only for the trigger, the whsec_… secret shown under Webhook address in the integration's Edit dialog.

Saving the credential calls GET /api/v1/me to check the key.

Metis node

Resource Operation API call
Page Search GET /search?query=
Page Get GET /pages/{id}
Page Create POST /pages
Page Append POST /pages/{id}/append
Database Get Many GET /databases
Row Get Many GET /databases/{id}/rows, following nextCursor with Return All
Row Query POST /databases/{id}/query (filter, sort, updated after, limit)
Row Create POST /databases/{id}/rows
Row Update PATCH /databases/{id}/rows
Row Delete POST /databases/{id}/rows/delete

Pages and databases are dropdowns of what the key reaches. Each input item makes one request; a key can make 120 requests a minute, so for big batches turn on the node's Retry On Fail or add a Wait.

Metis Trigger

Starts the workflow on page.created, page.updated, page.deleted, row.created, row.updated or row.deleted (and test, if ticked).

Metis has no API for setting the webhook address, so copy the node's webhook URL and paste it under Webhook address in the integration's Edit dialog in Metis. Use the Test URL while building, and the Production URL once the workflow is published.

The node checks every request's X-Metis-Signature (HMAC-SHA256 of timestamp.rawBody with the signing secret) and refuses requests older than five minutes, so no Code node or NODE_FUNCTION_ALLOW_BUILTIN=crypto is needed.

Develop

npm install
npm run lint
npm run build
npm test        # signature check, against the build
npm run dev     # n8n with the nodes loaded, on http://localhost:5678

API reference: Integrations and the API.

Discussion