API Docs/Guides/n8n Integration
Guide
n8n Integration
Automate your LinkedMash workflows using n8n. Create custom automations to sync bookmarks, trigger actions, and integrate with your favorite tools and services.
What is n8n?
n8n is a powerful workflow automation tool that connects different services and creates complex automation workflows. The LinkedMash integration enables bookmark management, notifications, and data synchronization.
Automated Workflows
Create complex automation workflows for bookmark management.
Third-party Integrations
Connect with Slack, Discord, Notion, and hundreds of other services.
Custom Triggers
Set up triggers based on new bookmarks, labels, or specific content.
Prerequisites
1
LinkedMash API Token
Generate an API token from your LinkedMash account settings
2
n8n Instance
Set up n8n locally or use n8n Cloud
3
HTTP Request Node
Use n8n's HTTP Request node to interact with LinkedMash API
Installation & Setup
Step 1: Install n8n
Global npm installation:
bash
npm install n8n -gDocker setup:
bash
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8n.io/n8nStep 2: Start n8n
bash
n8nAccess the web interface at http://localhost:5678
Step 3: Configure LinkedMash Integration
Add a "LinkedMash" node or use an HTTP Request node in your n8n workflow.
HTTP Request Configuration:
text
Method: GET
URL: https://api.linkedmash.com/v1/bookmarks
Headers:
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
Query Parameters:
limit: 10
is_unread_only: true
sort_by: NEWEST_FIRSTLinkedMash API Endpoints for n8n
GET/v1/bookmarks
Retrieve bookmarks with filtering and pagination. Use case: Fetch recent bookmarks for processing.
GET/v1/labels
Get all user labels. Use case: Retrieve available labels for organization.
POST/v1/labels/add
Add labels to specific tweets. Body example: {"tweet_id": "123", "label": "Important"}
POST/v1/labels/remove
Remove labels from specific tweets. Body example: {"tweet_id": "123", "label": "Important"}
Configuration Examples
HTTP Request Node Configuration
text
Method: GET
URL: https://api.linkedmash.com/v1/bookmarks
Headers:
Authorization: Bearer $json.api_token
Content-Type: application/json
Query Parameters:
limit: 10
is_unread_only: true
sort_by: NEWEST_FIRSTError Handling & Best Practices
Best Practices
- Rate Limiting: Implement delays between API calls to respect rate limits
- Error Handling: Add error handling nodes to catch and log API failures
- Data Validation: Validate API responses before processing data
- Security: Store API tokens securely using n8n credentials