Moe Ahad
Templates by Moe Ahad
Query MySQL database with natural language using GPT AI
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works Using chat node, ask a question pertaining to information stored in your MySQL database AI Agent converts your question to a SQL query AI Agent executes the SQL query and returns a result AI Agent can remember the previous 5 questions How to set up: Add your OpenAI API Key in "OpenAI Chat Model" node Add your MySQL credentials in the "SQL DB - List Tables and Schema" and "Execute a SQL Query in MySQL nodes" Update the database name in "SQL DB - List Tables and Schema" node. Replace "yourqueryname" under the Query field with your actual database name After the above steps are completed, use the "When chat message received" node to ask a question about your data using plain English
Generate personalized weather reports with OpenWeatherMap, Python and GPT-4.1-mini
How it works User enters name of a city for which most current weather information will be gathered Custom Python code processes the weather data and generates a custom email about the weather AI agent further customizes the email and add a related joke about the weather Recipient gets the custom email for the city Set up instructions Enter city to get the weather data Add OpenWeather API and replace <yourAPIkey> with your actual API key Add your OpenAI API in OpenAI Chat Model Node Add your Gmail credentials and specify a recipient for the custom email
Auto-block focus time in Google Calendar on busy days
How it works: This flow checks the user's Google calender of events from Sunday to Saturday of current week, to determine how many hours have been booked each day. If a day has over 6 hours booked, it blocks out the remaining work hours for dedicated focus time. The flow assumes 8 work hours per day. For example, if the Monday of this week has 6.5 hours booked (for meetings, tasks etc.), it automatically blocks off the remaining 1.5 hours for dedicated focus time, so external users can see and not book new events for those hours. Benefit: Prevents users from being overloaded with meetings and gives time for dedicated deep work/focus time. Set up steps: Update start time of the "Schedule Trigger," this is the time the flow will run daily. Note: the workflow assumes a 9AM-5PM work schedule so it's recommended to schedule the flow to trigger before 9AM. Update the credentials for the "Get Full Weeks Events" and "Create Focus Time Event" nodes. Use your Google credentials so the workflow can connect to your Google calendar.