Monitor DeFi liquidation risk with OpenAI GPT-4.1 and Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs on a schedule (every 10 minutes). Along the way it connects Google Sheets, OpenAI and Slack.
How it runs
Trigger: On a schedule (every 10 minutes).
- Load Monitor Configuration (Edit Fields (Set)): sets 5 fields: position_api_url, price_api_url, warning_threshold…
- Fetch Lending Position (HTTP Request): calls an HTTP API
- Validate Lending Position (If): checks a condition and branches into true / false
- Fetch Live Asset Price (HTTP Request): calls an HTTP API
- Validate Market Price (If): checks a condition and branches into true / false
- Calculate Risk Metrics (Code): runs custom JavaScript code
- Classify Liquidation Risk (Code): runs custom JavaScript code
- Log Monitoring Result (Google Sheets): append
- Check Alert Required (If): checks a condition and branches into true / false
- Generate Risk Alert Message (OpenAI): uses OpenAI
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - OpenAI
@n8n/n8n-nodes-langchain.openAi - Slack
n8n-nodes-base.slack - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview This workflow runs every 10 minutes to monitor a DeFi lending position by fetching position and price data via HTTP, calculating liquidation risk metrics, logging results to Google Sheets, and sending AI-written Slack alerts (via OpenAI) when…