This workflow automates fetching cryptocurrency data via the CoinGecko API, supporting operations like events, coins, coin, history, candlestick, market, marketChart, price, and ticker. Key nodes include Webhook Trigger (starts via POST), Input Validation (checks operation), Check Operation Type (routes operations), Get Events/Coins/Coin/History/Candlestick/Market/MarketChart/Price/Ticker Data (API calls), and Success/Validation Error Response (returns results/errors).\n\nSetup Requirements and Configuration: Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud setup. Follow prompts or create a cloud account. CoinGecko’s free API requires no credentials for public endpoints, but for rate-limited access, sign up at coingecko.com, go to the 'API' section, and generate an API key (optional for higher limits). In n8n, import the JSON workflow. If using an API key, configure CoinGecko nodes (e.g., Get Events, Get Price Data) with the key under ‘Credentials’ > ‘CoinGecko API.’ Set Webhook Trigger path to ‘crypto-data,’ configure for POST requests, and set allowedOrigins to ‘https://*’ for secure access. Optionally add header authentication (e.g., ‘Authorization: Bearer your-key’). Ensure server supports API calls.\n\nTesting and Deployment Steps: Test with Postman using a POST request to the Webhook URL. Example JSON: {'operation': 'price', 'baseCurrency': 'bitcoin', 'quoteCurrency': 'usd'} or {'operation': 'events', 'limit': 5}. Success responses return 200 with data (e.g., price data, event list) and a timestamp. Error nodes return 400 for invalid operations (e.g., unsupported operation). Check logs for errors like ‘Rate limit exceeded’ or ‘Invalid coinId,’ and verify inputs or API key. Activate workflow in n8n. Validate output: ensure data matches operation (e.g., prices for price operation), timestamp is current, and success is true. Debug errors using n8n logs for rate limits, invalid parameters, or network issues.
$6.99
Workflow steps: 31
Integrated apps: webhook, if, respondToWebhook