API Docs/Guides/n8n Integration
Guide
n8n Integration
Automate your TweetsMash workflows using n8n. Create custom automations to sync bookmarks, trigger actions, and integrate with your favorite tools.
What is n8n?
n8n is a powerful workflow automation platform that allows you to connect different services and create complex automation workflows. With TweetsMash integration, you can automate bookmark management, content analysis, and data synchronization.
Automated Workflows
Create complex automation workflows with visual nodes
Service Integration
Connect with 200+ services and APIs
Data Processing
Transform and analyze bookmark data
Prerequisites
1
TweetsMash API Token
Generate an API token from your TweetsMash 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 TweetsMash API
π Getting Started
Step 1: Generate TweetsMash API Token
First, you'll need to generate an API token from your TweetsMash account:
- Go to your TweetsMash dashboard
- Navigate to Settings β Integrations β API
- Click "Generate New Token"
- Copy the generated token (you'll need this for n8n)
Step 2: Configure n8n HTTP Request Node
Basic Configuration:
text
Method: GET
URL: https://api.tweetsmash.com/v1/bookmarks
Headers:
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/jsonStep 3: Test Your Connection
Test your n8n workflow by executing a simple request to fetch bookmarks:
text
Method: GET
URL: https://api.tweetsmash.com/v1/bookmarks
Query: limit=5
Expected: JSON response with bookmark dataAvailable API Endpoints
GET/v1/bookmarks
Retrieve all bookmarks with optional filtering and pagination.
Use case: Fetch bookmarks for processing or analysis
Parameters: limit, cursor, is_unread_only, author, tag, date ranges
GET/v1/labels
Get all user labels for organization.
Use case: Check existing labels before creating new ones
POST/v1/labels/add
Add labels to specific tweets.
Use case: Automatically label bookmarks based on content analysis
Body: {tweet_ids: [], label_id: 'string'} or {tweet_ids: [], label_name: 'string'}
POST/v1/labels/remove
Remove labels from specific tweets.
Use case: Remove labels from bookmarks based on conditions
Body: {tweet_ids: [], label_name: 'string'}
Configuration Examples
HTTP Request Node Configuration
text
Method: GET
URL: https://api.tweetsmash.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