n8n Workflows
This guide is for testing the LayerProof n8n node locally, separate from the main service-poc dev flow.
LayerProof can run inside a local or self-hosted n8n instance through the published community node package n8n-nodes-layerproof, so you do not need to call the API manually.
Before You Start
Make sure you have:
- Docker
- Docker Compose
- a local folder for your n8n project
- a valid LayerProof API key
This document already includes the full local Docker setup below.
Important:
- this guide is for local or self-hosted n8n
- use the API origin only for
Base URL - do not append
/apior/api/v2
Examples:
- correct:
https://api.dev.layerproof.app - incorrect:
https://api.dev.layerproof.app/api/v2
Local Setup
1. Create a local n8n project
mkdir test-n8n-layerproof
cd test-n8n-layerproof
2. Create docker-compose.yml
services:
n8n:
image: n8nio/n8n:stable
container_name: n8n-layerproof
ports:
- "5678:5678"
environment:
- TZ=Asia/Ho_Chi_Minh
volumes:
- ./n8n-data:/home/node/.n8n
3. Start n8n
docker compose up -d
4. Install the LayerProof node package
docker exec -it n8n-layerproof sh -lc 'mkdir -p /home/node/.n8n/nodes && cd /home/node/.n8n/nodes && npm init -y && npm install --legacy-peer-deps n8n-nodes-layerproof@latest'
5. Restart n8n
docker restart n8n-layerproof
6. Verify the package is installed
docker exec -it n8n-layerproof sh -lc "ls -la /home/node/.n8n/nodes/node_modules/n8n-nodes-layerproof"
7. Open n8n
http://localhost:5678
Add the Node in n8n
Use this flow:
- Create a new workflow
- Add
Manual Trigger - Click the
+button after the trigger - Search for
LayerProof
LayerProofis not a trigger node- do not search for it from the first trigger picker screen
Create LayerProof Credentials
-
Add the
LayerProofnode -
Create a new credential for
LayerProof API -
Enter:
API Key: your LayerProof API keyBase URL: your LayerProof API origin
-
Save the credential
Expected values:
API Key:sk_live_...Base URL:https://api.dev.layerproof.app
First Test
Start with a simple read-only call:
- Add
Manual Trigger - Add
LayerProof - Select your credential
- Set:
Resource:ProjectOperation:List
- Optionally set
Limitto1 - Execute the node
If setup is correct, the response should contain:
datanext_cursorhas_more
Common Mistakes
- using the wrong
Base URL - adding
/apior/api/v2intoBase URL - pointing to the web app instead of the API origin
- installing the package in the wrong directory
- forgetting to restart n8n after install
- searching for
LayerProofin the trigger picker
Troubleshooting
The node does not appear
Check that:
- the package installation finished successfully
- community nodes are allowed in your local n8n instance
- you reloaded the editor or restarted n8n
Credential test fails
Check that:
- the API key is valid
- the
Base URLis correct - the
Base URLdoes not include/apior/api/v2
The API returns 403
This usually means the API key is valid, but the account does not have the required LayerProof public API access.
The API returns HTML instead of JSON
This usually means the Base URL points to the frontend app instead of the API origin.
Update the Package Later
docker exec -it n8n-layerproof sh -lc 'cd /home/node/.n8n/nodes && npm update --legacy-peer-deps n8n-nodes-layerproof'
docker restart n8n-layerproof
Summary
To test LayerProof in local n8n:
- Start a local n8n Docker project
- Install
n8n-nodes-layerproof - Restart n8n
- Add the
LayerProofnode - Create
LayerProof APIcredentials - Test with
Project -> List