Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

Email Assistant: Convert Natural Language to SQL Queries with Phi4-mini and PostgreSQL

n8n template #3761
Who 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
  1. Auto Categorise Outlook Emails with AI39K
  2. πŸ‹DeepSeek V3 Chat & R1 Reasoning Quick Start37K
  3. Local Chatbot with Retrieval Augmented Generation (RAG)29K
  4. πŸ€– AI content generation for Auto Service 🚘 Automate your social mediaπŸ“²!27K
  5. AI Agent with Ollama for current weather and wiki13K
  6. πŸ”πŸ¦™Private & Local Ollama Self-Hosted + Dynamic LLM Router12K
  7. WordPress - AI Chatbot to enhance user experience - with Supabase and OpenAI11K
  8. Query Google Sheets/CSV data through an AI Agent using PostgreSQL8,069
Buy me a coffee