Requirement:
Connect MySQL database and read content of table using N8N
Pre-requisites:
- n8n tools is installed
- mysql database is installed and accessible
Brief description of flow :
- here , the flow is triggered with a chat.
- In chat, the table name (only one) is given in "" (double quotes)
- Extract table name from the chat input
- Identify the table is present in database or not, using mysql node
- If table is present, extract the table content
- Extract the content of that table and send content in chat.
- If table is not present, send message back to chat "This table xxxx is not present in database""
Flow diagram is as following;