Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Chatbots & Messaging Bots

Chatbots & Messaging Bots

Sell Products with an OpenAI Chatbot Backed by MySQL

When a chat message arrives, an OpenAI chatbot with Postgres memory looks up products in a MySQL database and answers customer questions.

What it does

# modelo do chatbot ## Overview Automated workflow: modelo do chatbot. This workflow integrates 9 different services: stickyNote, toolHttpRequest, mySqlTool, memoryPostgresChat, set. It contains 18 nodes and follows best practices for error handling and security. ## Workflow Details - Total Nodes: 18 - Node Types: 9 - Error Handling: ✅ Implemented - Security: ✅ Hardened (no sensitive data) - Documentation: ✅ Complete ## Node Breakdown - If Node: if - Edit Fields1: set - Edit Fields2: set - OpenAI: openAi - Chat Trigger: chatTrigger - Postgres Chat Memory: memoryPostgresChat - Postgres Chat Memory1: memoryPostgresChat - Products in Daatabase: mySqlTool - Knowledge Base: toolHttpRequest - External API: toolHttpRequest - ... and 8 more nodes ## Usage Instructions 1. Configure Credentials: Set up all required API keys and credentials 2. Update Variables: Replace any placeholder values with actual data 3. Test Workflow: Run in test mode to verify functionality 4. Deploy: Activate the workflow for production use ## Security Notes - All sensitive data has been removed or replaced with placeholders - Error handling is implemented for reliability - Follow security best practices when configuring credentials ## Troubleshooting - Check error logs if workflow fails - Verify all credentials are properly configured - Ensure all required services are accessible

The steps

  1. Manual Trigger
  2. If Node
  3. Edit Fields1
  4. Edit Fields2
  5. OpenAI
  6. Chat Trigger
  7. Postgres Chat Memory
  8. Postgres Chat Memory1
  9. Products in Daatabase
  10. Knowledge Base
  11. External API
  12. OpenAI2
  13. Error Handler
  14. Stopanderror 1

33 steps in total.

Similar automations