# Monitor DeFi liquidation risk with OpenAI GPT-4.1 and Slack alerts

> 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 the risk level changes or escalates. How it works 1. Runs every 10 minutes on a schedule. 2. Loads the monitoring configuration, including the lending position API URL and the asset price API URL. 3. Fetches the current lending position via HTTP and continues only if collateral amount, debt amount, and liquidation threshold are greater than zero. 4. Fetches the live collateral asset price via HTTP and continues only if the USD price is greater than zero. 5. Calculates health factor, estimated liquidation price, and distance to liquidation, then classifies the position risk level and determines whether an alert is required based on the previous risk level. 6. Appends each monitoring result to a Google Sheets “Monitoring History” work

- **Domain**: `n8n-workflow-20583.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/20583
- Page (HTML): https://agenstry.com/agents/n8n-workflow-20583.n8n.io
- Documentation: https://n8n.io/workflows/20583
