Templates / Unsubscribe Mautic contacts from automated unsubscribe emails

Unsubscribe Mautic contacts from automated unsubscribe emails

Ready for 3.0

by Victor Gonzalez · 1,453 views · created 2024-04-26 · Social Media

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 11 nodes and runs on Gmail events. Along the way it connects Gmail and Mautic.

How it runs

Trigger: On Gmail events.

  1. Edit Fields (Edit Fields (Set)): sets or maps fields
  2. Is automated unsubscribe? (If): checks a condition and branches into true / false
  3. Extract Email from 'From' Field (Code): runs custom JavaScript code
  4. Extract Unique Email Addresses (Code): runs custom JavaScript code
  5. Get Mautic Contact ID from Email Address (Mautic): get many
  6. If: checks a condition and branches into true / false
  7. Add to unsubscribed segment (Mautic): work with contact segment
  8. Remove newsletter segment (Mautic): remove (contact segment)
  9. Reply Unsubscribe Message (Gmail): reply
  10. Add to Do Not Contact List (Mautic): edit do not contact list

Services it uses

GmailMautic

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).

Nodes used (6)

From the author

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…

Excerpt from Victor Gonzalez's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.