DocsAutoResponderProcess

Email repository (central MSSQL)#

Purpose: Ingest auto-response emails for the pipeline (Step 1 in main.py).

Code: src/auto_responder/services/email_repository.py

Configuration#

SettingNotes
EMAIL_REPOSITORY_CONNECTION_STRINGRequired for a real repository (unless you only run dry-run with mocks).
default_max_email_resultsCap on rows returned (bounded in code to a safe maximum).
default_date_range_daysLookback window for ReceivedDate.
email_pull_start_date, email_pull_end_dateOptional explicit UTC bounds. When both are set, they override default_date_range_days.
email_repository_query_timeout_secondsCommand/query timeout for the SELECT.

Data store touch#

OperationWhenWhat
SELECTEvery run that uses EmailRepositorySELECT TOP (?) … FROM emails WITH (NOLOCK) with ReceivedDate range, body keyword filters (e.g. out-of-office style phrases), ordered by ReceivedDate

Columns read: Id, AccountName, Subject, Body, SenderEmail, ReceivedDate, InsertedDateTime.

The database name is whatever your connection string targets; the pipeline assumes an emails table in that database.

Writes#

None. The connector only reads. It does not INSERT, UPDATE, or mark rows processed.

Dry-run behavior#

Downstream use#