How to Parse Forwarded Emails in Make.com Using Regular Expressions (Regex Blueprint)

Parse Forwarded Emails in Make.com Regex
How to Parse Forwarded Emails in Make.com Using Regular Expressions: 2026 Production Blueprint

Executive Overview & Operational Challenge

One of the most widespread automation headaches in sales and customer service occurs when an executive or sales rep forwards a client email to an automated inbox (such as leads@acme.com or tickets@acme.com). Because the SMTP transport header marks the sales rep as the sender, naive automations create tickets under the employee’s name rather than the prospective client’s. Here is the definitive guide to Parse Forwarded Emails in Make.com Regex using native text parser modules, named capture groups, and multi-client normalization.

The Anatomy of Forwarded Email Headers: Gmail vs Outlook vs Apple Mail

When an email client forwards a message, it injects a metadata delimiter into the top of the message body. Unfortunately, there is no universal RFC standard for this block—every email vendor styles their delimiter differently:

1. Gmail Web & Mobile Format

---------- Forwarded message ---------
From: Sarah Connor <sarah@cyberdyne.com>
Date: Wed, Oct 14, 2026 at 2:34 PM
Subject: Urgent: Enterprise API Implementation Scope
To: John Sales <john@acme.com>

Hi John, could your team send over the SLA agreement?

2. Microsoft Outlook (Desktop & 365) Format

-----Original Message-----
From: Connor, Sarah <sarah@cyberdyne.com>
Sent: Wednesday, October 14, 2026 2:34 PM
To: John Sales <john@acme.com>
Subject: Urgent: Enterprise API Implementation Scope

Hi John, could your team send over the SLA agreement?

3. Apple Mail / iOS Mail Format

Begin forwarded message:

From: Sarah Connor <sarah@cyberdyne.com>
Subject: Urgent: Enterprise API Implementation Scope
Date: October 14, 2026 at 2:34:10 PM EDT
To: John Sales <john@acme.com>

Hi John, could your team send over the SLA agreement?

If you attempt to use simple string splitting functions like split(), a forward from an Outlook user will completely crash a pipeline built for Gmail. Before configuring the regex engine, explore our directory of Best Workflow Automation Software and evaluate how Make.com compares against self-hosted alternatives in our benchmark of Make vs n8n.

The Universal Forwarded Email Regex Pattern

To reliably parse inbound forwarded emails regardless of whether they originated from Gmail, Outlook, Apple Mail, or Yahoo, use this comprehensive regular expression:

(?:From|Sender):\s*(?:(?<name>[^<\r\n]+?)\s*<)?(?<email>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(?:>)?

Named Capture Group Breakdown

  • (?:From|Sender): Matches the label prefix for both Gmail, Outlook, and webmail providers.
  • (?<name>[^<\r\n]+?) Captures the optional display name of the original sender (e.g. Sarah Connor) without capturing line breaks.
  • (?<email>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}) Extracts the valid RFC-5322 email address of the original prospect.

Step-by-Step Scenario Configuration in Make.com

Step Module Name Action / Operation Configuration Parameters
1 Gmail / Outlook / Mailhook Watch Emails Folder: INBOX, Fetch body as plain text
2 Text Parser Match Pattern (Sender Extraction) Pattern: (?:From|Sender):\s*(?:([^<\r\n]+?)\s*<)?([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>?
3 Text Parser Match Pattern (Clean Body Extraction) Pattern: (?<=To:.*?\n\n)(?<body>[\s\S]+) (Singleline flag)
4 Router / Filter Validation Check Verify 2.email is valid and not an internal company domain
5 HubSpot / Zendesk / Airtable Create Lead / Ticket Customer Email = 2.email, Body = 3.body

Step 1: Ingesting Plain Text vs HTML Email Bodies

A common pitfall in Make.com is passing HTML email bodies (bodyHtml) into regex parsers. HTML contains unpredictable inline styling, invisible CSS tags, and non-breaking spaces (&nbsp;) that break regular expressions.

Rule: Always map the plain text body (textPlain) from your email trigger module. If your incoming webhook only provides raw HTML, place Make.com’s native HTML to text module before your regex step to strip all markup cleanly.

Step 2: Extracting the Original Email and Name

In the Make.com scenario builder:

  1. Add the Text Parser module and select the Match Pattern action.
  2. In the Pattern field, paste:
    (?:From|Sender):\s*(?:([^<\r\n]+?)\s*<)?([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>?
  3. Set Global match to No (you only want the first occurrence, which is the immediate forwarded header).
  4. Set Case insensitive to Yes.
  5. Set Multiline to Yes.
  6. In the Text field, map {1.textPlain}.

This step outputs two clean bundles: $1 (the original sender’s full name, e.g. “Sarah Connor”) and $2 (the original sender’s email address, e.g. “sarah@cyberdyne.com”).

Step 3: Extracting the Clean Body & Stripping Signatures

When an email is forwarded, the top of the email contains comments from your team member (e.g., “Hey team, see client email below, please handle ASAP”), followed by the separator line, and then the original client inquiry.

To isolate the original inquiry without the forwarder’s internal notes:

  1. Add a second Text Parser: Match Pattern module.
  2. Paste this pattern to extract everything beneath the forwarded header block:
    (?:Subject:.*?\n(?:To:.*?\n)?(?:Cc:.*?\n)?\s*\n)([\s\S]+)
  3. Enable Singleline (dot matches all) and Case insensitive.
  4. Capture group $1 will contain 100% of the client’s actual inquiry text, stripped of the messy header block!

Defensive Logic: Handling Direct Inquiries vs Forwarded Emails

Your automation inbox will likely receive a mix of both direct customer emails and internal forwards. If a prospect emails support@acme.com directly, the email body will NOT contain a ---------- Forwarded message --------- header.

To handle both seamlessly without breaking:

  1. Add a Router after your email trigger module.
  2. Path A (Forwarded Message): Apply filter: {1.textPlain} Contains "Forwarded message" OR {1.textPlain} Contains "-----Original Message-----".
    Route into the Text Parser regex modules described above.
  3. Path B (Direct Inquiry): Apply filter: Otherwise (fallback route).
    Map {1.from.email} and {1.textPlain} directly into your CRM.

Step 4: Normalizing Forwarded Timestamps to ISO-8601

Extracting the original forwarded timestamp is critical for maintaining accurate SLA timelines in helpdesk software like Zendesk or Jira Service Management. Because Gmail, Outlook, and Apple Mail format dates differently, use this multi-dialect regex pattern:

(?:Date|Sent):\s*(?:[a-zA-Z]+,\s*)?(?<raw_date>[a-zA-Z0-9,\s:]+(?:AM|PM|EDT|EST|PST|UTC|\+[0-9]{4}))

Once captured in raw_date, wrap the string inside Make.com’s native date functions to normalize it into standard ISO-8601:

{formatDate(parseDate(2.raw_date; "MMM DD, YYYY [at] h:mm A"); "YYYY-MM-DDTHH:mm:ssZ")}

This ensures your CRM records display the exact moment the client sent their message, rather than the delayed timestamp when your internal sales rep forwarded it.

Advanced Single-Pass JavaScript Parser Alternative

If your team wants to extract Sender, Recipient, Date, Subject, and Body in a single execution step (saving Make.com operation quotas), insert a Code / Custom Webhook node running this unified parser:

// Universal Forwarded Email Parser in JavaScript
function parseForwardedEmail(textPlain) {
  const emailRegex = /(?:From|Sender):\s*(?:([^<\r\n]+?)\s*<)?([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>?/i;
  const dateRegex = /(?:Date|Sent):\s*([^\r\n]+)/i;
  const subjectRegex = /Subject:\s*([^\r\n]+)/i;
  const bodyRegex = /(?:Subject:.*?\n(?:To:.*?\n)?(?:Cc:.*?\n)?\s*\n)([\s\S]+)/i;

  const senderMatch = textPlain.match(emailRegex);
  const dateMatch = textPlain.match(dateRegex);
  const subjectMatch = textPlain.match(subjectRegex);
  const bodyMatch = textPlain.match(bodyRegex);

  return {
    is_forwarded: !!(senderMatch && senderMatch[2]),
    original_sender_name: senderMatch ? (senderMatch[1] || "").trim() : null,
    original_sender_email: senderMatch ? senderMatch[2].trim() : null,
    forwarded_date_string: dateMatch ? dateMatch[1].trim() : null,
    forwarded_subject: subjectMatch ? subjectMatch[1].trim() : null,
    clean_body: bodyMatch ? bodyMatch[1].trim() : textPlain.trim()
  };
}

This single-pass function processes the entire forwarded email in sub-millisecond time, outputting a clean dictionary that maps directly into your database.

Handling Multilingual International Forwarding Headers (DE, FR, ES)

Global enterprise teams routinely encounter email clients localized in different languages. In French, German, or Spanish desktop clients, labels like From: or Date: are replaced by localized terms:

  • German (Outlook & Thunderbird): Von: [Sender], Gesendet: [Datum], Betreff: [Thema], An: [Empfänger].
  • French: De : [Expéditeur], Envoyé : [Date], Objet : [Sujet], À : [Destinataire].
  • Spanish: De: [Remitente], Enviado el: [Fecha], Para: [Destinatario], Asunto: [Tema].

To ensure your Make.com scenario never breaks when processing messages from European subsidiaries or global clients, use this internationalized multilingual regex:

(?:From|Sender|Von|De):\s*(?:(?<name>[^<\r\n]+?)\s*<)?(?<email>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(?:>)?

Parsing Structured Data Tables from Forwarded Notifications

Often, forwarded emails contain repetitive tabular patterns—such as daily e-commerce sales summaries, server alert logs, or order line items. For instance:
Item: Widget Pro | Qty: 2 | Price: $99.00

To extract multiple repeating rows into discrete Make.com bundles:

  1. Add a Text Parser → Match Pattern module.
  2. Set Global match to Yes. This instructs Make.com to loop through the entire body and output a separate bundle for every matched line.
  3. Apply the tabular regex:
    Item:\s*(?<item>[^|]+?)\s*\|\s*Qty:\s*(?<qty>\d+)\s*\|\s*Price:\s*\$(?<price>[0-9.]+)
  4. Downstream modules (like Google Sheets or Airtable) will execute once for each line item found, enabling automated batch ledgering from forwarded email digests.

Extracting Attachment Filenames & Extensions via Regex

When sales teams forward client RFP emails, they frequently mention attached scopes or contracts in the message body. In webhook scenarios where raw MIME headers are forwarded as text, you can extract referenced document filenames using this file extension pattern:

(?<filename>[a-zA-Z0-9_-]+\.(?:pdf|docx?|xlsx?|csv|zip))

By passing this regex into a Text Parser → Match Pattern module with Global match: Yes, Make.com identifies every document referenced in the conversation history, allowing your workflow to tag CRM opportunities with exact file requirements before a sales engineer opens the ticket.

Diagnostic Checklist for Make.com Regex Failures

  • Check 1: Singleline vs Multiline Flags: In regex, Multiline (m) causes ^ and $ to match the start and end of every line, while Singleline (s) causes the dot . to match newline characters. If your body extraction cuts off at line 1, make sure Singleline is enabled.
  • Check 2: Hidden Zero-Width Characters: Email clients occasionally insert invisible UTF-8 zero-width spaces (\u200B) or non-breaking spaces (\u00A0). If your regex fails on visibly identical text, run a preliminary Text Parser replace module: [\u200B\u00A0] → " ".
  • Check 3: Escaped Forward Slashes: In standard JavaScript regex, slashes must be escaped (\/), but in Make.com’s Text Parser pattern field, literal slashes do not require escaping unless used inside custom character classes.
  • Check 4: Error Handling Configuration: For resilient workflows that don’t crash when APIs experience downtime, review our guide on Make.com Error Handlers.

Cost Comparison: Native Regex in Make.com vs Dedicated Parser SaaS

Solution Monthly Cost Execution Latency Annual Cost (5,000 Emails/mo) Data Privacy
Make.com Native Regex Parser $0.00 extra (Native Module) < 50 milliseconds $0.00 / year Direct in Make.com
Mailparser.io Professional $49.00 / month 15 to 45 seconds $588.00 / year Third-party SaaS database
Parseur Growing Business $69.00 / month 30 to 60 seconds $828.00 / year Third-party SaaS database

Eliminating unnecessary third-party email parsing apps saves your agency hundreds of dollars in operational spend every year. Calculate your exact infrastructure savings with our SaaS Burn Rate Calculator.

Production Hardening: 4 Rules for Zero-Error Email Parsing

  1. Handling Nested Multi-Forwards: If an email has been forwarded 3 times internally before reaching the automation inbox, multiple From: lines exist. Using Global match: No guarantees that the regex parser binds to the topmost forwarded header, correctly capturing the client who originated the conversation.
  2. Internal Domain Filtering: Always add a filter verifying that the parsed email does NOT end in @youragency.com. This prevents internal notes from inadvertently updating a CRM record if a team member forwarded an email to themselves.
  3. Strip Trailing Auto-Replies & Signatures: Add a regex replacement module to strip out generic confidentiality disclaimers (e.g., This email and any attachments are confidential...) before saving clean conversation logs into your CRM.
  4. Error Recovery Routes: Wrap your regex parsing steps in a Resume error handler to inject default fallback sender info if an unusual email client layout is encountered.

Hardening Your Agency’s Email Automation Pipelines

Our engineering lab builds custom, fault-tolerant email ingestion and CRM sync workflows tailored for high-volume sales and customer support organizations.

Schedule an Email Architecture Audit →
MH

Written by Mamun Hossain

Founder & Systems Architect

Mamun is a performance marketing consultant, systems architect, and founder of Zelobiz with over 8 years of experience scaling paid acquisition, server-side attribution, and workflow automations. He independently tests and audits enterprise SaaS software, developer utilities, and ergonomic workspace gear.

Leave a Comment