Skip to content

Instantly share code, notes, and snippets.

Intro

Our company uses an AI-powered calendar system to predict the best time to email each customer. For example, Joe might respond best on Mondays at 7 AM in early January, and Tuesdays at 11 AM after mid-January. These preferred times vary by customer and change over time based on updated predictions.

Your task is to design a FollowUp system that sends recurring emails to customers. After each email is sent, your system must fetch a new next_communication_time from the AI Calendar and schedule the next email accordingly. This cycle continues until the customer is disabled or removed from the system.

Constraints and Requirements

  • Each email must be sent at the predicted time.
  • Email timings are not fixed or recurring at regular intervals — they are dynamically updated by the AI Calendar.