Skip to content
FlowHubFluxonLab
C
Gmailfree

Unsubscribe Mautic contacts from automated unsubscribe emails

by Victor Gonzalezadapted from n8n official workflow galleryUpdated Aug 2026
RequiresCCodeGmailGmailMauticMautic
Share Post Share
Gmail TriggerIfIs automated unsubscribe?Is automated un…Add to unsubscribed segmentAdd to unsubscr…Remove newsletter segmentRemove newslett…Reply Unsubscribe MessageReply Unsubscri…Add to Do Not Contact ListAdd to Do Not C…CoExtract Email from 'From' FieldExtract Email f…CoExtract Unique Email AddressesExtract Unique …Get Mautic Contact ID from Email AddressGet Mautic Cont…IfIf Contact Exists in MauticIf Contact Exis…SeEdit Fields1234567891011
1/5
STEPS · 11
Starts on a Gmail event

Who is this for? This template is designed for businesses and organizations that use Mautic for email marketing and want to automate the process of removing contacts from specific segments when they receive an unsubscribe request via email. What problem is this workflow solving? / use case Many email recipients, especially those who are less tech-savvy, may not follow the standard unsubscribe link provided in emails. Instead, for example in Gmail, they click the "Unsubscribe" button in the Gmail web interface, which in turn sends an email with a consistent format, these emails contain the word unsubscribe in the 'To' field using the following structure: [email protected] This workflow automates the process of identifying such unsubscribe emails and removing the contact from the relevant Mautic segments, ensuring compliance with unsubscribe requests and maintaining a clean mailing list. What this workflow does Monitors a Gmail account for incoming emails. Identifies unsubscribe emails based on specific patterns in the "To" field (e.g., containing the word "unsubscribe"). Retrieves the contact's ID from Mautic based on the email address.

Tags

n8nreference-onlygmailmautic
Connects
CCodegmailGmailmauticMautic
CategoryGmail
Triggermanual
Complexitycomplex
Nodes11
AddedApr 26, 2024

Related workflows

See all Gmail
Cgmailgoogledrivesheets
free

Generate an FAQ MP3 library from form input with OpenAI TTS, Google Drive, Sheets and Gmail

Quick overview This workflow collects up to five FAQ questions and answers from an n8n Form, converts each entry to an MP3 using OpenAI text-to-speech, uploads the files to Google Drive, logs links in Google Sheets, and emails a summary with listen and download links via Gmail. How it works Receives an n8n Form submission containing the requester’s email, a FAQ category, and up to five question-and-answer pairs. Splits the submitted FAQ pairs into individual items, generating a TTS script and a safe MP3 filename for each valid question and answer. Calls the OpenAI Audio Speech API (tts-1) to generate an MP3 file for each FAQ script. Uploads each generated MP3 to a specified Google Drive folder. Builds Google Drive view and direct-download URLs for each uploaded file and appends the FAQ details and links to a Google Sheets tab. Aggregates all processed FAQs into a single HTML summary and sends it to the submitter via Gmail with listen and download links. Setup Add an OpenAI API credential for the HTTP request to the OpenAI Audio Speech endpoint. Create (or choose) a Google Drive folder for the audio files, connect Google Drive OAuth2, and replace YOUR_AUDIO_FOLDER_ID with the target

by Incrementors
CgmailsheetsW
free

Extract and validate invoice PDFs with OpenAI, Google Sheets, and Gmail

Quick overview This workflow collects an invoice PDF via an n8n Form, extracts text from the PDF, uses OpenAI to convert it into structured invoice JSON, logs invoice headers and line items to Google Sheets, validates totals, and emails a formatted extraction report via Gmail. How it works Receives an invoice submission through an n8n Form that includes the uploader’s name, email address, currency, notes, and a PDF file. Extracts text content from the uploaded PDF. Sends the extracted text to OpenAI (Chat Completions) to return invoice fields and all line items as a strict JSON object. Parses and validates the returned JSON, enriching it with the form metadata and stopping the run if key fields (like invoice number or line items) are missing. Appends a single invoice “header” row to the Invoices tab in Google Sheets. Splits the extracted line items, adds per-line metadata and a unique key, and appends each line item as a row to the Line Items tab in Google Sheets. Aggregates all line items, verifies that their summed totals match the invoice total within a tolerance, builds an HTML report, and emails it to the submitter via Gmail. Setup Add an OpenAI API credential and ensure the O

by isaWOW
CgmailsheetsW
free

Capture and log email trade instructions with Gmail, OpenAI, and Google Sheets

Quick overview This workflow polls Gmail for emails with the subject “Trade Instruction”, uses OpenAI Chat Completions to extract trade fields from the email body, logs valid and failed extractions to separate tabs in Google Sheets, and sends confirmation and ops alert emails via Gmail. How it works Triggers every minute by polling Gmail for new messages matching the query subject:"Trade Instruction". Extracts the email body, sender address, subject, and message/thread IDs and generates a trade reference and timestamps. Sends the email body to OpenAI (Chat Completions) to return a JSON object containing asset, ticker, action, quantity, price, client, and notes. Parses the returned JSON, validates that asset is present and quantity is greater than zero, and marks the result as valid or failed with a reason. Appends valid trade instructions to the “Valid Trades” tab in Google Sheets, or appends failures (including a snippet and error reason) to the “Failed Trades” tab. For valid trades, replies to the original email in Gmail with a receipt confirmation and emails the ops team a capture notification, and for failed trades, emails the ops team a manual-review alert with the original em

by Incrementors