AWS Builder Center
Weekend Annoying Task Challenge: Tech Event Calendar Auto-Registration Agent

Weekend Annoying Task Challenge: Tech Event Calendar Auto-Registration Agent

A Lambda + Amazon Bedrock agent that turns real event reservation-confirmation emails into Google Calendar entries automatically — plus the story of how 40 auto-registered events turned out to be false positives, and how a stricter classification prompt fixed it.

Project Manager/General Manager

Vision & What the App Does

Every week I sign up for two or three tech meetups and conferences through connpass, Peatix, or Doorkeeper. Every single time, the moment the "reservation confirmed" email lands in my inbox, I have to manually copy the event title, date, time, and location into my personal Google Calendar. If it's something I also want to block time for at work, I do it a second time for my company calendar. It's a tiny task, but it happens almost daily, and small annoying tasks that repeat forever are exactly the kind of thing worth automating.
Tech Event Calendar Auto-Registration Agent watches my Gmail inbox for genuine reservation-confirmation emails from event platforms, uses Amazon Bedrock to pull out the structured event details, and writes them straight to my personal Google Calendar, already filled in with the date, time, location, and event URL. If I want my company to see the same block on their side, I can add a company email address as an invitee, and Google Calendar sends it a standard meeting invite that any mail client (including Outlook) understands. The actual reservation still has to happen through the event site's own signup flow, but the tedious "now copy it into my calendar" step disappears completely.

How You Built It

The original plan was more ambitious: watch Gmail, decide which events looked interesting, and auto-register for them too. I dropped that quickly, since every platform requires an interactive login to actually reserve a seat, so there's no clean way to automate that part safely. Narrowing the scope to "automate only the calendar step after a confirmation email arrives" turned a fuzzy, risky idea into something I could actually ship in a weekend.
The implementation is a single Lambda function with clearly separated modules: Gmail search, Bedrock extraction, DynamoDB dedupe, and Google Calendar registration. The first real design pivot happened when I assumed my company also used Google Calendar and built a second OAuth flow to write "busy" blocks directly to a company Google account, only to realize my company actually runs on Outlook. Rather than building a whole second integration against Microsoft Graph, I replaced it with something much simpler: add the company address as a calendar attendee. Google Calendar's invite emails are just standard iCalendar invites over SMTP, so Outlook receives and understands them natively. That single decision cut an entire OAuth integration, an extra Google Cloud project, and a second secret out of the design.
The harder lessons came after deploying and running the agent against my real inbox instead of test fixtures. Two bugs only showed up under real load:
  1. A "dry run" that wasn't actually dry. My first version wrote a dedupe record to DynamoDB even when  DRY_RUN=true , so a single test run silently marked real emails as "already processed." They'd never register for real, even after switching  DRY_RUN  off. I caught this by comparing dry-run output against the real run and noticing the numbers didn't add up. The fix: skip DynamoDB writes entirely during dry runs.
  1. One bad email could kill the whole batch. A single Bedrock extraction failure (an oddly-encoded email) raised an exception outside my try/except block, aborting every other message in that invocation. I narrowed the exception handling so one message's failure gets logged and skipped without blocking the rest.
The most interesting problem, though, was a false-positive storm: my first Bedrock prompt classified far too generously. It happily flagged "your group just published a new event," "the event is tomorrow," and "message from the group organizer" emails as genuine reservation confirmations, because they did mention a specific dated event, just not one I'd personally registered for. I ran the pipeline against two months of real Gmail history and found that every single one of the 40 events my agent had auto-registered turned out to be a false positive. Zero genuine confirmations among them. I rewrote the prompt around one strict question: "does this email confirm that I personally just completed a registration, or is it just describing an event?" I added explicit negative examples pulled straight from my own inbox, then validated the new prompt against real Bedrock calls before redeploying. The very next run correctly skipped all 40 previously-misclassified emails, and when I dug further back, it correctly identified two genuine confirmations the earlier version would have missed entirely.


AWS Services Used / Architecture Overview

  • Amazon EventBridge Scheduler triggers the agent every 3 hours ( rate(3 hours) ). This is the sole trigger; there's no manual step in normal operation.
  • AWS Lambda (Python 3.12) runs the whole pipeline in one function: Gmail search → Bedrock extraction → dedupe check → calendar write.
  • Amazon Bedrock (Amazon Nova Lite via the Converse API with tool-use/function-calling) turns unstructured email text into a typed  is_event_confirmation / title / start_datetime / location / url  object.
  • Amazon DynamoDB stores processed Gmail message IDs so the same email is never registered twice.
  • AWS Secrets Manager holds the Google OAuth refresh token, refreshed on every invocation rather than cached long-term.


What I Learned

  • Bedrock's Converse API with tool-use is excellent at pulling reliable structured data out of messy, real-world email text, but the classification criterion in the prompt matters far more than the extraction schema. A loosely worded "does this describe an event" prompt will happily say yes to newsletters, reminders, and organizer broadcasts.
  • Testing against a handful of hand-written fixtures is not the same as testing against your actual inbox. My unit tests all passed the whole time; the false-positive problem only surfaced once real data hit the pipeline.
  • A "dry run" mode needs to be audited for side effects just as carefully as the real path — it's easy to assume  if dry_run: skip the risky call  is sufficient and miss a write happening earlier in the flow.
  • Not every cross-platform integration needs its own OAuth client. Standard calendar invite emails turned out to be a much simpler bridge to Outlook than building a second, parallel Microsoft Graph integration.

Link to Repo

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article