How to Add Spam Protection to n8n Forms

By

Co-founder & Brand Designer

Reviewed by Onar Alili

Anti-Abuse Engineer & Co-founder

To add spam protection to an n8n form, put the verified oopspam node (that’s us 👋) between your n8n Form Trigger and the step that handles the submission. The node checks the message, email address and IP address of each submission and returns a spam score from 0 to 6. An If node then sends spam to a log and genuine messages to your inbox. There’s no CAPTCHA, so real visitors fill in the form as normal.

In this guide we’ll build that workflow step by step: a contact form that emails genuine messages to your team and saves spam to a data table for review.

Prefer to watch? Here’s the same workflow in a 9-minute video:

Does n8n Form Have Spam Protection?

Not really. The n8n Form Trigger has an Ignore Bots option, but it only ignores link previewers and web crawlers, the kind of bots that open a URL without filling it in. There’s no CAPTCHA, honeypot or content check. Basic Auth and n8n User Auth can restrict who opens the form, but a public contact form needs to stay open.

Once a form’s production URL is shared, spam bots find it like any other form. Every spam submission then runs your workflow: it sends emails, creates CRM records or uses AI credits, and each run counts toward your n8n executions.

What the oopspam Node Does

oopspam is a verified n8n node, built by the oopspam team and reviewed by n8n. It has three actions:

  • Check for Spam: scores a submission’s content, email address and IP address from 0 to 6. A score of 3 or more is spam. Options can also block disposable emails, VPNs, data center IPs, countries and languages.
  • Check Domain Reputation: checks whether a domain is on reputation blocklists.
  • Report Misdetection: sends a false positive or false negative back to oopspam so detection improves.

Because it’s verified, you can install it on n8n Cloud and self-hosted n8n. Only the instance owner or an admin can install it, and once they do, everyone on the instance can use it (n8n docs).

How to Build the Workflow

The finished workflow has six nodes. A contact form sends each submission to oopspam, and an If node routes it by spam score.

The finished workflow: Contact form, Configuration, Check message for spam, Is it spam?, then Log spam submission or Email message to your team

We renamed each node to describe what it does. If you keep n8n’s default names, such as On form submission for the Form Trigger, use those names in the expressions below instead of Contact form.

Step 1: Add the oopspam node

  1. Open the workflow editor and click + to open the nodes panel.
  2. Search for oopspam. The verified badge next to the name shows it’s the official node.
  3. Select it. If it isn’t installed on your instance yet, click Install. Only the instance owner or an admin can do this.

The verified oopspam node in the n8n nodes panel

Step 2: Add your oopspam API key

  1. Create a free oopspam account and copy your API key from the dashboard.
  2. In n8n, create a new Oopspam API credential and paste the key into API Key. n8n tests the key and shows Connection tested successfully.

Copy your API key from the oopspam dashboard

The Oopspam API credential in n8n after a successful connection test

Step 3: Create the contact form

Add an n8n Form Trigger node and rename it Contact form. Set a form title and add three form elements, each with Required Field turned on:

  • Name, with Element Type set to Text Input
  • Email, with Element Type set to Email
  • Message, with Element Type set to Textarea

Under Options, turn on Ignore Bots so link previewers don’t trigger the workflow, and turn on Show Headers so the submission includes the request headers. You’ll use them to get the visitor’s IP address in Step 5.

The form elements in the n8n Form Trigger, with Ignore Bots turned on

Step 4: Add a Configuration node

Add an Edit Fields (Set) node named Configuration with three values you can change later without touching the other nodes:

  • notifyEmail: where genuine messages are sent
  • fromEmail: the sender address for those emails
  • spamThreshold: the score at which a submission counts as spam. We recommend keeping it at 3.

Step 5: Check the message for spam

Add the oopspam node, select your credential and set Operation to Check for Spam. Map the fields:

  • Content: {{ $('Contact form').item.json.Message }}
  • Email: {{ $('Contact form').item.json.Email }}
  • Sender IP: the visitor’s IP address, if your trigger provides it (see below)

The Check for Spam operation with Content and Email mapped, and the list of Additional Fields

The n8n Form Trigger doesn’t capture the visitor’s IP address as a field. If your n8n instance is behind a proxy such as Cloudflare, the proxy adds the visitor’s IP to the request headers, which you turned on with Show Headers in Step 3. Map Sender IP to this expression:

{{ (() => { const h = $('Contact form').item.json.headers || {}; return String(h['cf-connecting-ip'] || h['x-forwarded-for'] || h['x-real-ip'] || '').split(',')[0].trim(); })() }}

If the headers don’t include the IP, the expression returns an empty value and oopspam still checks the content and email. Sending the IP lets oopspam check it against IP blocklists and apply VPN, data center and country rules. The same expression works with a Webhook trigger, which includes the headers by default.

In the node’s Settings, set On Error to Continue. If oopspam can’t be reached, the message is still emailed to you instead of being lost.

The node returns a Score from 0 to 6 and a Details object, for example isEmailBlocked and numberOfSpamWords.

Step 6: Route spam and genuine messages

Add an If node named Is it spam? with one condition:

  • {{ Number($json.Score ?? -1) }} is greater than or equal to {{ $('Configuration').item.json.spamThreshold }}

The ?? -1 makes a failed check count as not spam, so it goes to the false branch and reaches your inbox.

The If node comparing the spam score with the threshold

Step 7: Log spam and email genuine messages

True branch (spam): create a data table named spam_submissions with the columns name, email, message and score. Then add a Data table node with Resource set to Row and Operation set to Insert, choose the table and map each column. n8n adds the id and createdAt columns automatically.

The Data table node mapping the form fields and the oopspam Score into spam_submissions

False branch (genuine): add a Send Email node and connect your SMTP credential. Set From Email and To Email to the fromEmail and notifyEmail values from Configuration, and build the subject and body from the form fields. Under Options, add Reply To with the sender’s email so you can answer directly, and turn off Append n8n Attribution.

The Send Email node with Reply To set to the sender's email

Test the Workflow

  1. Click Execute workflow. n8n opens the form’s test URL.
  2. Submit a normal message, such as “Hi, I’d like a quote for 20 custom t-shirts.” It should take the false branch and arrive in your inbox.
  3. Submit an obvious spam message, such as “Get 1000 backlinks cheap, best SEO services, visit our site now!” It should take the true branch and appear in your data table.
  4. Open the Check message for spam node to see what oopspam returned, including the Score.

A spam test submission saved in the spam_submissions table with a score of 6

When it works, publish the workflow and share the form’s production URL. Production runs don’t show in the editor, so check them under the workflow’s Executions tab (n8n docs).

Fine-Tune the Spam Filter

  • Change the threshold. We recommend keeping spamThreshold at 3. It catches most spam without flagging real messages. Change it only if you see a pattern in your data table, such as real messages scoring 3.
  • Add filters. In the oopspam node, click Add Field under Additional Fields. The options are Allowed Languages, Allowed Countries, Blocked Countries, Block Temporary Emails, Block VPN, Proxy and Tor, Block Data Center IPs, Check for Length, Content Context, Log to Dashboard, Source and URL Friendly. Country, VPN and data center rules need the Sender IP. Blocking temporary emails and VPNs suits sign-up and lead forms more than contact forms.
  • Report mistakes. If a real message lands in your data table, or spam reaches your inbox, send it back with the Report Misdetection action. You can build a small workflow that reports a row from the spam_submissions table.

Use It Beyond n8n Forms

The same three nodes in the middle work with any trigger. Swap the Form Trigger for a Webhook to protect a form on your own website, or for the trigger of Typeform, Jotform, Webflow or any other form app n8n supports. Swap the email node for Slack or your CRM, or the data table for Google Sheets.

FAQ

Does n8n Form have a CAPTCHA?

No. The Form Trigger has no CAPTCHA or honeypot. Its Ignore Bots option only skips link previewers and web crawlers, not spam bots.

Can I use the oopspam node on n8n Cloud?

Yes. It’s a verified node, so it works on n8n Cloud and self-hosted n8n. The instance owner or an admin installs it once from the nodes panel.

What spam score should I block?

We recommend 3. oopspam scores from 0 to 6, and 3 or more means spam. Check your data table now and then, and report any real messages that were flagged.

What happens if oopspam is down?

With On Error set to Continue and the ?? -1 fallback in the If node, the submission goes to your inbox as normal, so you never lose a real message.

Does spam still use my n8n executions?

Yes. Each submission starts the workflow. The difference is that spam stops after the spam check, so it doesn’t send emails, create records or use AI credits further down the workflow.

Final Thoughts

n8n Forms are quick to build but have no spam protection of their own. Adding the verified oopspam node takes one node and an If check, and it keeps spam out of your inbox, CRM and later workflow steps without a CAPTCHA. Start with the contact form workflow above, then reuse the same check on any form or webhook in n8n.

Spam Protection for WordPress, Zapier, Make and more.

Since our launch in 2017 we’ve been perfecting our API to be the trusted option for small businesses to enterprise— and continue to stick to our values of being the accessibility and privacy-friendly option. Give us a shot!

Try oopspam for free → Try our WordPress plugin for free →

âś“ No credit card required âś“ Cancel anytime