Skip to templates
AI Craft Pad
CONNECTED SERVICE RECIPE · Support

Labelled Gmail → Google Sheets

Log metadata from up to five recent labelled emails without reading bodies or sending replies.

Preview by defaultOwn accounts required for live modeMIT · AI Craft Pad
1Find labelled mail
2Read selected headers
3Check message IDs
4Append unseen rows

What happens in live mode

The live branch searches Gmail for the configured label and recent date window, retrieves only From, Subject and Date headers for up to five messages, and appends unseen message IDs to a review sheet. It does not open attachments, fetch message bodies, change read status or reply. Preview uses synthetic metadata.

The downloaded workflow is unpublished and its Configuration mode is preview. In preview, the service branch is skipped. The website demo below also stays local. Changing a JSON input cannot enable live mode; that setting belongs to the workflow owner.

LOCAL PREVIEW · NO SERVICE REQUESTS

Inspect the data before connecting.

Edit the synthetic input to see the proposed fields, rows or report text. This is a transformation preview, not a call to HubSpot, Google, a feed or Telegram. No credentials belong in this form.

Ready. Inspect the preview before any live configuration.

Connect and test in your own n8n

Import the file without publishing it. The workflow includes its source, validation, duplicate/empty handling where applicable, and destination nodes. Credentials are intentionally unbound; select your own credentials in n8n rather than editing secrets into Code nodes.

  1. Create a Google Sheet with Mail headers message_id, from, subject, date in A1:D1. Put its ID in Configuration.
  2. Create a Gmail OAuth2 credential with custom https://www.googleapis.com/auth/gmail.readonly scope and a separate Google Sheets OAuth2 credential with spreadsheets scope. Select them in the matching HTTP nodes. Enable Gmail and Sheets APIs for your OAuth project.
  3. Apply the aicp-export label to a small test set in Gmail, or edit Configuration gmail_query to your deliberate selection. The default requests the latest five matches within seven days.
  4. Run preview first. After reviewing the synthetic rows, set mode to live and execute manually with the test mailbox/sheet.
  5. Check that only message ID and the three selected headers were written. Run again and confirm IDs already present in the sheet are skipped. Keep mailbox access read-only.
Download connected n8n recipe

SHA-256: c6f0a0b527d646d52d5a1638fcc9364d83a1c2a0594cc067102386821828d7d5

Failure, repeat runs and recovery

This bounded run takes the latest five matching messages and does not follow pagination. It is not a full mailbox export or a durable polling cursor. The sheet lookup is limited to A2:D1001. Concurrent runs can race. Empty results produce no append. Stop and reconcile a timed-out append before retrying.

HTTP request nodes have a 10-second timeout and stop on errors. Writes are not automatically retried. Authentication failures, rate limits and ambiguous timeouts require inspection in your own n8n execution view and destination account before rerunning. Do not turn a provider error into an empty successful lookup.

Data handling

Sender, subject and date can contain personal or confidential information. In live mode they leave Gmail for the chosen Google Sheet via your n8n instance. The OAuth read-only grant is broader than the exact headers this recipe requests; use a suitable test account and retention policy.

The export disables saved success/error execution data and manual-execution saving. Your instance logs and provider retention still apply; review those settings for your account. No live account is connected to AI Craft Pad by this page.

Costs and requirements

Needs your n8n instance and Google OAuth/API setup. Google account restrictions, verification requirements and API quotas may apply. No paid AI service is used.

Continue with another task