Email Assistant: Convert Natural Language to SQL Queries with Phi4-mini and PostgreSQL
n8n template #3761Summary
Use templateWho is this for? π§π»π«±π»βπ«²π»π€ Humans and Robots alike. This workflow can be used as a Chat Trigger, as well as a Workflow Trigger. It will take a natural language request, and then generate a SQL query. The resulting query parameter will contain the query, and a sqloutput parameter will contain the results of executing such query. What's the use case? This template is most useful paired with other workflows that extract e-mail information and store it in a structured Postgres table, and use LLMs to understand inquiries about information contained in an e-mail inbox and formulate questions that needs answering. Plus, the prompt can be easily adapted to formulate SQL queries over any kind o
Hand off to your agent
Prompt
Help me set up the n8n workflow "Email Assistant: Convert Natural Language to SQL Queries with Phi4-mini and PostgreSQL" (https://n8n.io/workflows/3761). It uses: Postgres, AI Agent, Ollama Chat Model. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Similar workflows
NameViews
- Auto Categorise Outlook Emails with AI39K
- πDeepSeek V3 Chat & R1 Reasoning Quick Start37K
- Local Chatbot with Retrieval Augmented Generation (RAG)29K
- π€ AI content generation for Auto Service π Automate your social mediaπ²!27K
- AI Agent with Ollama for current weather and wiki13K
- ππ¦Private & Local Ollama Self-Hosted + Dynamic LLM Router12K
- WordPress - AI Chatbot to enhance user experience - with Supabase and OpenAI11K
- Query Google Sheets/CSV data through an AI Agent using PostgreSQL8,069