All writing

Connecting mailbox notifications to background work

Published

A retrospective on work from 2025–2026.

I worked on an email-processing integration that connected Microsoft Graph with AWS and an LLM-backed workflow. The implementation involved notifications, queued processing, token refresh and processing-job records. Later work included a fix to keep replies in their conversation thread.

The engineering challenge was working across the boundaries between those services.

A notification starts the work

An incoming notification is a signal that there is something to process. The worker still needs to obtain the message, use the appropriate access and carry out the application’s processing step.

I worked on the processor and its supporting token handling. That made authentication part of the background workflow, rather than only something to complete when a person first connects an account.

It is a useful distinction in integration work. The initial connection and a later background request happen at different times, with different surrounding application state. The code has to account for the credentials it actually has when it performs the work.

Follow the job as well as the message

The implementation maintained processing-job records alongside the email integration. That gives the application a place to represent the work it is doing, rather than treating a remote message identifier as the whole workflow.

I would not use the existence of a queue or a duplicate check as evidence of exactly-once processing. Those claims need stronger validation. The experience here is implementing the integration and working through its behaviour across service boundaries.

That same distinction applies to an LLM call. Generating a response is one step. Fetching the right input and carrying the result back into the surrounding application are engineering work in their own right.

The thread is part of the result

One later change concerned keeping replies in the existing conversation thread. It is a small-sounding requirement, but it connects the technical result to the person reading the mailbox.

A response needs an appropriate place in the interaction, as well as content. Working on that behaviour reinforced a practical way of reviewing integrations: follow the result all the way to where the person will encounter it.

This work brought together external APIs, background processing and AI integration. Following a message through that whole path gave me a more concrete understanding of the feature than looking at any one service in isolation.

Client work is described anonymously; examples focus on my contribution and general engineering lessons.