How baba-ti/automatic_product_management works
Automatic Product Management is an n8n workflow that accepts questions through chat, Slack, or a calling workflow, normalizes them, queries a PostgreSQL database with AI-assisted table selection and SQL generation, and returns an answer through the configured output channel. Its README also documents a separate example-data preparation capability: a notebook defines the sample schema, and a Python generator inserts test data. Workflow internals are represented from README descriptions; the workflow JSON and notebook were not sampled, so their detailed wiring is not independently verified.
Main entry points: product_management.json Common response · insert_tables_for_supabase.py Sample data generator · create_tables_for_supabase.ipynb Example schema
Components 19
Input adapters
- n8n Chat
product_management.json - Slack Input
product_management.json - Sub-workflow input
product_management.json
Shared query flow
- Request Context
product_management.json - Table selection
product_management.json - Schema lookup
product_management.json - SQL generation
product_management.json - Read query
product_management.json - Answer writing
product_management.json
Output adapters
- Common response
product_management.json - Chat response
product_management.json - Reply Slack
product_management.json - Caller return
product_management.json
Sample data setup
- Example schema
create_tables_for_supabase.ipynb - Sample data generator
insert_tables_for_supabase.py
Other components
- Questioner
- Workflow caller
- PostgreSQL
- OpenAI API
Connections 26
- Questioner → n8n Chat: asks via
README.md - Questioner → Slack Input: messages via
README.md - Workflow caller → Sub-workflow input: calls with request
README.md - n8n Chat → Request Context: normalizes request
README.md - Slack Input → Request Context: normalizes request
README.md - Sub-workflow input → Request Context: normalizes request
README.md - Request Context → Table selection: passes request
README.md - Table selection → Schema lookup: selects tables for
README.md - Schema lookup → PostgreSQL: reads metadata
README.md - Schema lookup → SQL generation: provides schema
README.md - Table selection → OpenAI API: selects tables with
README.md - SQL generation → OpenAI API: generates SQL with
README.md - SQL generation → Read query: passes query
README.md - Read query → PostgreSQL: reads data
README.md - Read query → Answer writing: returns results
README.md - Answer writing → OpenAI API: writes answer with
README.md - Answer writing → Common response: returns answer
README.md - Common response → Chat response: routes Chat response
README.md - Common response → Reply Slack: routes Slack reply
README.md - Common response → Caller return: returns to caller
README.md - Chat response → Questioner: delivers answer
README.md - Reply Slack → Questioner: sends reply
README.md - Caller return → Workflow caller: returns answer
README.md - Example schema → PostgreSQL: creates example tables
README.md - Sample data generator → PostgreSQL: inserts test data
insert_tables_for_supabase.py - Sample data generator → OpenAI API: generates sample text with
README.md