2 Commits

Author SHA1 Message Date
KS Jannette
28a368326d more 2026-02-18 06:21:04 -05:00
S Jannette
50214fb4e5 Merge pull request #3 from kjannette/processEmails
Ingest and process emails, take calendar actions, build rich spreadsheets.
2026-02-18 06:12:25 -05:00
2 changed files with 16 additions and 1 deletions

View File

@@ -740,10 +740,24 @@ server.registerTool(
},
async ({ account, title, startDateTime, durationMinutes, description, location }) => {
try {
const start = new Date(startDateTime);
if (start.getTime() < Date.now()) {
return {
content: [
{
type: "text" as const,
text:
`Skipped calendar event "${title}" — the proposed date ` +
`(${start.toISOString()}) is in the past.`,
},
],
};
}
const calendar = getCalendarClient(account);
const calendarId = getCalendarId(account);
const start = new Date(startDateTime);
const end = new Date(start.getTime() + (durationMinutes ?? 60) * 60_000);
const event = await calendar.events.insert({

View File

@@ -38,6 +38,7 @@ When an email indicates advancement beyond the recruiter screen to a company int
STRICT CONSTRAINTS:
- Do not make up phone numbers, links, dates, or anything at all. If it does not exist in text wihtin a verifiable email, IT DOES NOT EXIST.
- PAST-DATE CHECK: Before creating a calendar event, compare the proposed meeting date/time against today's date. If the meeting date has already passed, do NOT create a calendar event for it. Still log it to the spreadsheet, but skip the calendar step. The tool will also enforce this server-side.
- As described in more detail below, each new date/time value in a scheduling column = one new calendar event. Never skip this.
- Always use the same account for calendar events as was used for email fetching.
- Do not create duplicate calendar events for the same meeting.