{"name":"Vehicle Service Reminder System","nodes":[{"id":"schedule","type":"n8n-nodes-base.scheduleTrigger","name":"Daily Service Check","position":[250,300],"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"0 7 * * *"}]}}},{"id":"fetchVehicles","type":"n8n-nodes-base.httpRequest","name":"Get Vehicle Service Records","position":[450,300],"parameters":{"url":"={{$env.SHOP_MGMT_API}}/vehicles/due-for-service","method":"GET","queryParameters":{"include":"customer,service_history"}}},{"id":"loop","type":"n8n-nodes-base.splitInBatches","name":"Process Each Vehicle","position":[650,300],"parameters":{"batchSize":1}},{"id":"aiPersonalize","type":"n8n-nodes-base.openAi","name":"AI Personalize Reminder","position":[850,300],"parameters":{"model":"gpt-4o-mini","prompt":"Write a friendly, professional service reminder for {{$json.customer_name}} about their {{$json.vehicle_year}} {{$json.vehicle_make}} {{$json.vehicle_model}}. Service needed: {{$json.service_type}}. Last service: {{$json.last_service_date}}. Current estimated mileage: {{$json.estimated_mileage}}. Keep SMS version under 160 chars. Also write a longer email version (3-4 sentences). Return JSON: {sms_text: string, email_subject: string, email_body: string}"}},{"id":"sendSMS","type":"n8n-nodes-base.twilio","name":"Send SMS Reminder","position":[1050,200],"parameters":{"to":"={{$json.customer_phone}}","from":"={{$env.TWILIO_PHONE}}","body":"={{$json.sms_text}}"}},{"id":"sendEmail","type":"n8n-nodes-base.sendGrid","name":"Send Email Reminder","position":[1050,400],"parameters":{"to":"={{$json.customer_email}}","subject":"={{$json.email_subject}}","text":"={{$json.email_body}}"}},{"id":"markSent","type":"n8n-nodes-base.httpRequest","name":"Log Reminder Sent","position":[1250,300],"parameters":{"url":"={{$env.SHOP_MGMT_API}}/reminders","method":"POST","body":{"vehicle_id":"={{$json.vehicle_id}}","service_type":"={{$json.service_type}}","sent_at":"={{$now.toISO()}}"}}}],"connections":{"Daily Service Check":{"main":[[{"node":"Get Vehicle Service Records","type":"main","index":0}]]},"Get Vehicle Service Records":{"main":[[{"node":"Process Each Vehicle","type":"main","index":0}]]},"Process Each Vehicle":{"main":[[{"node":"AI Personalize Reminder","type":"main","index":0}]]},"AI Personalize Reminder":{"main":[[{"node":"Send SMS Reminder","type":"main","index":0},{"node":"Send Email Reminder","type":"main","index":0}]]},"Send SMS Reminder":{"main":[[{"node":"Log Reminder Sent","type":"main","index":0}]]},"Send Email Reminder":{"main":[[{"node":"Log Reminder Sent","type":"main","index":0}]]}}}