{"product_id":"n8n-gmail-trigger-log-labeled-emails-to-google-sheets","title":"n8n Gmail Trigger: Log Labeled Emails to Google Sheets","description":"\u003ch3\u003eLog Gmail emails with the \u003cem\u003eEmail-Logger\u003c\/em\u003e label into Google Sheets—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow polls your Gmail for new messages tagged with \u003cstrong\u003elabel:Email-Logger\u003c\/strong\u003e, extracts key email details, and continuously logs them into a Google Sheets tab—deduplicated by \u003cstrong\u003eGmail message ID\u003c\/strong\u003e to keep your sheet clean.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks Gmail every minute\u003c\/strong\u003e for up to \u003cstrong\u003e20\u003c\/strong\u003e new messages matching the search query \u003ccode\u003elabel:Email-Logger\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts core fields\u003c\/strong\u003e from each email, including:\n    \u003cul\u003e\n      \u003cli\u003eGmail \u003cstrong\u003emessage ID\u003c\/strong\u003e and \u003cstrong\u003ethread ID\u003c\/strong\u003e\n\u003c\/li\u003e\n      \u003cli\u003e\u003cstrong\u003eReceived time\u003c\/strong\u003e\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eSender\u003c\/strong\u003e and \u003cstrong\u003eReply-To\u003c\/strong\u003e addresses\u003c\/li\u003e\n      \u003cli\u003e\u003cstrong\u003eSubject\u003c\/strong\u003e\u003c\/li\u003e\n      \u003cli\u003eA short \u003cstrong\u003etext preview\u003c\/strong\u003e\n\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends or updates\u003c\/strong\u003e rows in Google Sheets using \u003cstrong\u003emessage_id\u003c\/strong\u003e as the unique key, so duplicates are avoided.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWrites values as raw text\u003c\/strong\u003e into the \u003cstrong\u003eEmails\u003c\/strong\u003e sheet.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTrack inbound communication\u003c\/strong\u003e: label important threads and maintain a structured log in Google Sheets for reporting or follow-ups.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOperational auditing\u003c\/strong\u003e: capture sender, subject, and timestamps for emails that meet your labeling rules.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation testing and monitoring\u003c\/strong\u003e: verify that specific Gmail messages trigger downstream processes while still keeping a human-readable record.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n Gmail Trigger\u003c\/strong\u003e (polling\/lookup behavior) to find messages with \u003ccode\u003elabel:Email-Logger\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCode\u003c\/strong\u003e node to normalize key fields (message\/thread IDs, timestamps, addresses, subject, preview)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e integration to write into the \u003cstrong\u003eEmails\u003c\/strong\u003e tab\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eConnect your \u003cstrong\u003eGmail\u003c\/strong\u003e credentials and create\/apply the \u003cstrong\u003eEmail-Logger\u003c\/strong\u003e label (manually or via a Gmail filter).\u003c\/li\u003e\n  \u003cli\u003eConnect \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, set the spreadsheet ID, and ensure there is a tab named \u003cstrong\u003eEmails\u003c\/strong\u003e with columns including \u003cstrong\u003emessage_id\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eActivate the workflow to start logging labeled emails continuously.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46072076206259,"sku":"N8N-19803","price":53.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ZMOLOrCJ8HTK9rAhVs31z_slkhqNTc.png?v=1790067937","url":"https:\/\/buyflowscripts.com\/products\/n8n-gmail-trigger-log-labeled-emails-to-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}