Define the product output before selecting a scope
An inbox summary, contact timeline, attachment search, and compliance archive need different data. Write the exact fields, retention period, and user-visible value first; then choose the narrowest Gmail scopes and formats that support it.