Skip to main content

Flag bounced emails in Google Sheets from Gmail delivery error messages

Workflow preview

Workflow preview
100%
Flag bounced emails in Google Sheets from Gmail delivery error messages preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Scanning Email Inbox for Delivery Errors Prerequisite: [Automate Personalized Email Campaigns with Google Docs, Sheets, and SMTP](https://n8n.io/workflows/7065 automate personalized email campaigns...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.set, n8n-nodes-base.gmail, n8n-nodes-base.if, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Stéphane Heckel.

Original n8n.io source

1.1 Workflow description

Title
Flag bounced emails in Google Sheets from Gmail delivery error messages
Workflow name
Flag bounced emails in Google Sheets from Gmail delivery error messages

Scanning Email Inbox for Delivery Errors

Prerequisite: Automate Personalized Email Campaigns with Google Docs, Sheets, and SMTP.

How It Works

After running your email campaign, some messages may fail to deliver. This workflow scans your email inbox for delivery errors (e.g., bounced messages), flags problematic email addresses in the Google Sheet and ensures future campaigns skip them.

How to Use

  1. Ensure Prerequisite Workflow:

  2. Google Sheet Setup:

    • Use the Google Sheet Template.
    • Identify your document’s ID (the string after /d/ and before /edit in the URL).
  3. Configure Workflow:

    • Enter your Google Sheet ID in the settings node.
    • Connect your Google credentials to n8n.
  4. Email Inbox:

    • Set up the readspamfolder node to search for bounce/error messages in your mail (e.g., in the Spam or Inbox folders—adjust label/folder if emails land elsewhere).
  5. Google Sheet Update:

    • Configure the lookupemail and update_err nodes

Requirements

  • Google Credentials to access Gmail and sheets.
  • Gmail Account (bounce/error messages must be accessible here).
  • n8n Version: Tested with 1.105.2 (Ubuntu).

Need Help?

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - geterremail

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - listerremail

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - readspamfolder

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 5 - undelivered_failure

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 6 - lookupemail

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 7 - update_err

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 8 - keep_row

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - settings

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Flag bounced emails in Google Sheets from Gmail delivery error messages
Complexity advanced
Nodes 18
Categories Social Media, Multimodal AI
Author Stéphane Heckel
Published 11 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7251/7251.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Flag bounced emails in Google Sheets from Gmail delivery error messages do?

Scanning Email Inbox for Delivery Errors Prerequisite: [Automate Personalized Email Campaigns with Google Docs, Sheets, and SMTP](https://n8n.io/workflows/7065 automate personalized email campaigns...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.