LLM Chatbot, Web Scraper, and Appointment Booker

This workflow creates an AI-powered chatbot and web scraper API using OpenAI and Microsoft Outlook for chat, web scraping, and appointment booking. Key nodes include Webhook (handles POST requests at /api/ai-chatbot-scraper), Input Validation (processes input data), Route Operation Type (handles availability, message, scraper, chat routes), AI Agent (uses gpt-4o-2024-08-06 for chat), Get Calendar Events (fetches Microsoft Outlook events), Make Appointment (books meetings), HTTP Request Tool (fetches webpages), Convert to Markdown (processes HTML), Success Response (returns JSON), and Error Response (handles invalid inputs). Customize by updating the AI Agent’s systemMessage.\n\nSetup Requirements and Configuration: Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io. Obtain an OpenAI API key from platform.openai.com under ‘API Keys’ and a Microsoft Outlook OAuth2 token via developer.microsoft.com. Import the JSON workflow in n8n. Configure OpenAI Chat Model and Make Appointment/Get Calendar Events nodes with respective credentials under ‘Credentials.’ Set the Webhook node to use HTTPS and path ‘api/ai-chatbot-scraper’ under Settings > Webhook. Ensure HTTPS server support; use ngrok for local testing. Verify internet connectivity for API requests. No Telegram credentials needed, as it processes external requests.\n\nTesting and Deployment Steps: Activate the workflow to get the Webhook URL (e.g., https://your-n8n-instance/api/ai-chatbot-scraper). Test with POST requests, e.g., { "message": "Book an appointment", "sessionId": "test123" } or { "route": "scraper", "query": "?url=https://example.com&method=simplified" }. Success responses return JSON with ai_response, availability, or page_content. Error response (HTTP 400) occurs for missing inputs. Check n8n logs for errors like ‘Invalid OpenAI API key,’ ‘Microsoft OAuth failure,’ or ‘Webhook not accessible.’ Validate outputs: ensure ai_response addresses queries, availability lists free slots, and page_content matches webpage data. Debug using n8n logs for credential or network issues. Ensure stable internet for webhook and API reliability. Update chatInput or route in POST body for varied interactions.

$6.99

Workflow steps: 35

Integrated apps: webhook, set, if

LLM Chatbot, Web Scraper, and Appointment Booker preview