Forms, email and CRM
Your WordPress site's contact forms are rebuilt on the new site. This page explains where the messages go and how to set up each service. You don't need to read the code.
Short version: every form sends an email through Resend. If the business uses HubSpot or monday.com, wp2next also copies each lead there. The email is the safety net: if the CRM has a bad day, the lead still arrives in your inbox.
How it works
Every form on the site sends its answers to one place on the site, /api/contact. From there the
message goes to one or more destinations, in this order:
- Email (Resend), or a webhook to a tool like Zapier, Make or n8n. These must succeed. If they fail, the visitor sees "please try again" and nothing else is sent, so trying again creates no duplicates.
- CRMs (HubSpot, monday.com). Copies made after the email. If a CRM copy fails, the visitor still sees "thank you" and the failure is written to the site's logs.
You pick the destinations in the migrate interview. They are saved in wp2next.json as
forms.destinations, for example ["resend", "hubspot"].
| You want | Choose |
|---|---|
| Messages in an inbox (most sites) | Resend |
| Messages in an inbox and contacts in HubSpot | Resend + HubSpot |
| Messages in an inbox and items on a monday.com board | Resend + monday.com |
| Messages sent to an automation you already run | Webhook (optionally + Resend) |
CRM-only (no email) works, but a failed CRM write then means the visitor has to try again, and wp2next will warn you. We don't recommend it.
Who owns the accounts
The business that owns the website should own these accounts, not the person building it. The
builder is invited, and removed at handover (wp2next handoff). Keys are stored with your password
manager through wp2next (see Secrets: where wp2next keeps passwords and API keys) and copied into Vercel. Never paste a key into a
chat, an email or a ticket.
Resend (email)
Resend sends the form emails from your own domain, so they don't land in spam.
Plans (checked 2026-12, pricing (external site)): Free is 100 emails a day and 3,000 a month, which is plenty for most contact forms. Pro is $20 a month for 50,000.
Set up (about 15 minutes, plus DNS waiting time):
-
The business signs up at resend.com (external site) with a shared work address (for example
web@example.com), not a personal one. Don't use the "Resend" integration in the Vercel Marketplace for a client site: that account belongs to whichever Vercel team installed it, which makes handover hard (Resend's Vercel guide (external site), checked 2026-12). -
In Resend, go to Domains → Add domain and add a sending subdomain:
send.example.com(what wp2next suggests) or another dedicated subdomain such asmail.example.com. Resend treats that subdomain as its own domain. Pick the region closest to you (it can't be changed later without redoing DNS). -
Resend shows three or four DNS records. Their names are relative to the domain you added, so for
send.example.comthey sit undersend.example.com. Copy the names and values from the Resend dashboard exactly (the values depend on the region); don't rebuild them from this table. Forsend.example.comthey typically look like this (the Name column is what you type at a DNS host that managesexample.com):Type Name Full name What it is MX send.sendsend.send.example.combounce handling, priority 10 TXT send.sendsend.send.example.comSPF: v=spf1 include:amazonses.com ~allTXT resend._domainkey.sendresend._domainkey.send.example.comDKIM signature key (With
mail.example.comthey would besend.mailandresend._domainkey.mail.) These live under the sending subdomain, so your normal email (Google Workspace, Microsoft 365) is not affected. Don't add Resend to your main SPF record. Source: Resend domains (external site) (checked 2026-12). -
Click Verify. It can take from minutes to a few hours.
-
Recommended: add a DMARC record if you don't have one: TXT at
_dmarc.example.comwithv=DMARC1; p=none; rua=mailto:you@example.com. Tighten it later (Resend DMARC guide (external site), checked 2026-12). -
Go to API Keys → Create API key, choose Sending access, and restrict it to your domain. wp2next asks you to paste it at a hidden prompt (
secrets.py put RESEND_API_KEY).
wp2next also needs two plain settings (not secret):
- From address (
FORMS_FROM): for exampleAcme Website <forms@send.example.com>. It must be on the domain you verified (the subdomain itself). The visitor's own address goes in "reply-to", so you can just hit Reply. - Recipients (
FORMS_TO): who gets the emails, separated by commas. wp2next copies these from your WordPress form settings and shows them to you first.
Optional tools for your AI assistant: Claude Code users can add Resend's plugin
(claude plugin install resend@claude-plugins-official); others can use npx skills add resend/resend-skills
or Resend's hosted MCP server (checked 2026-12, Resend MCP (external site)).
The site's form code doesn't need any of them.
HubSpot
Use HubSpot as a destination when the business manages leads in HubSpot. Each form type is recorded in one of two ways:
| Mode | What happens in HubSpot | Use it for |
|---|---|---|
Form submission (form) | A form submission on a HubSpot form; the contact becomes a marketing contact; HubSpot links it to the visitor's earlier page views (if they accepted cookies) and records consent | Newsletter sign-ups (always), and contact forms when HubSpot runs your marketing emails |
CRM contact (crm) | The contact is created or updated by email address as a non-marketing contact | Sales or service enquiries you don't want counted as marketing contacts (marketing contacts affect HubSpot billing) |
Sources (checked 2026-12): marketing contact status (external site), form submissions API (external site), contacts API (external site).
Create a service key (HubSpot's current way to give a website access; checked 2026-12, service keys (external site)):
- You need to be a Super Admin, or have the "Developer tools access" permission.
- In HubSpot go to Development → Keys → Service keys → Create service key (older menus: Settings → Integrations → Service Keys).
- Name it after the website, for example "Website forms".
- Add the scopes
formsandcrm.objects.contacts.write(addcrm.objects.contacts.readtoo if you like). - Create it, click Show, copy it, and paste it when wp2next asks (
secrets.py put HUBSPOT_SK). - Optional: turn on automatic rotation. When the key rotates, store the new one the same way and wp2next copies it to Vercel.
Notes:
- Service keys are new (public beta since February 2026). HubSpot stopped letting people create the older "private apps" on 2026-10-26; an existing private-app token still works in the same place.
- You don't need to find your Hub ID: the site reads it from the key, so leads can't end up in the wrong HubSpot account.
- HubSpot may switch off a key it finds exposed in public (for example in a public GitHub repo).
For "form submission" mode, create the HubSpot form:
- Marketing → Forms → Create form (an embedded form is fine; it won't be shown on the site).
- Add the same fields as the website form: first name, last name, email, phone, message, plus any custom ones (create custom properties first).
- Turn reCAPTCHA off on this HubSpot form. The website has its own spam protection, and HubSpot rejects server submissions from forms with reCAPTCHA on.
- If you want marketing consent (needed for EU/UK visitors, good practice everywhere), turn on the form's consent options. Copy the exact wording; the website's checkboxes must say the same thing.
- Copy the form's ID (in the form editor's address bar, or Actions → Share → Embed code). It looks
like
1a2b3c4d-1a2b-1a2b-1a2b-1a2b3c4d5e6f. wp2next saves it inwp2next.json(it's not secret).
HubSpot tracking code: visit history only works when the HubSpot tracking code runs on the site, which wp2next sets up when you choose HubSpot in the tracking questions, and only after the visitor accepts cookies. Leads from visitors who decline still arrive, just without their page history.
Limits: on Free and Starter, 100 requests every 10 seconds and 250,000 a day, shared with every other integration on the account (checked 2026-12, usage guidelines (external site)). A contact form uses a tiny fraction of that.
monday.com
Use monday.com when leads are tracked on a board. Each submission becomes an item in a group you choose, with an update underneath that holds every answer.
Who the token belongs to: a monday.com API token acts as the user who created it. Ask the business to create a dedicated member (for example "Website") with access to the leads board only, and create the token as that user. If the token belongs to a person who later leaves and is deactivated, the website stops sending leads to monday.com. Viewers and guests can't use the API. Source: monday.com authentication (external site) (checked 2026-12).
Get the token: sign in as that user → profile picture → Developers → API token → Show,
copy it, and paste it when wp2next asks (secrets.py put MONDAY_API_TOKEN).
Find the board, group and column IDs (they're not secret; wp2next saves them in wp2next.json):
-
Board ID: open the board in a browser; it's the number in the address bar after
/boards/. -
Groups and columns: wp2next lists them for you with this command (the token is read from your password manager and never printed). It's written for bash (macOS, Linux, or Git Bash on Windows); on Windows, let the AI tool run it:
Terminal python3 "$SKILL/scripts/secrets.py" run -- sh -c 'curl -s https://api.monday.com/v2 \ -H "Authorization: $MONDAY_API_TOKEN" -H "API-Version: 2026-10" -H "Content-Type: application/json" \ -d "{\"query\":\"{ boards(ids:[1234567890]) { name groups { id title } columns { id title type } } }\"}"'(Replace
1234567890with your board ID.$SKILLis the folder wp2next is installed in; your AI assistant fills it in and can run this for you.) You can also see column IDs in the app after turning on profile picture → monday.labs → Developer mode.
Then tell wp2next:
- which group new leads go to. It never uses the board's top group automatically, because that is often a hand-picked list. Different topics (for example "Sales" and "Support") can go to different groups;
- which columns hold the email, phone, topic and message.
Status and dropdown columns only accept labels that already exist, unless the token's user may change the board. Long-text columns hold up to 2,000 characters; the full message is in the update.
Limits: free accounts get 200 API calls a day; paid plans get 1,000 or more (checked 2026-12, rate limits (external site)). Each form submission uses two calls.
Webhook
For Zapier, Make, n8n or your own system: create a "catch hook" in that tool and give wp2next its URL
(secrets.py put FORMS_WEBHOOK_URL; it's treated as secret because anyone with it could post fake
leads). If the tool supports a bearer token, store it as FORMS_WEBHOOK_TOKEN. Each request carries an
X-Submission-Id header so the tool can ignore repeats.
Testing
wp2next tests each form before launch:
- On your computer: each form is sent once. Each destination should report "created". For
repeated automatic tests, Resend's address
delivered@resend.devaccepts mail without bothering anyone (it still counts toward your daily quota; Resend test emails (external site), checked 2026-12). - Preview deployments only send email by default (
FORMS_DESTINATIONS=resendin Vercel's Preview environment), so test runs don't fill the CRM. - Before launch: one real message per form, on the production build. You check that it reached the right people, the right HubSpot contact, and the right monday.com group. Then delete the test contact and item.
If something goes wrong
| What you see | Likely cause | Fix |
|---|---|---|
| Visitor sees "please try again" | Email or webhook failed: wrong key, unverified domain, wrong from-address | Check the Resend dashboard (Logs); re-verify the domain; re-store the key with secrets.py put and push it to Vercel |
| Email arrives, HubSpot contact missing | Form type not mapped, reCAPTCHA on the HubSpot form, key missing a scope, or the daily API limit | Check the site logs for "hubspot failed"; turn reCAPTCHA off; check the key's scopes |
| Email arrives, no monday.com item | No group chosen for that topic, wrong column type, or the token's user was deactivated | Re-run the ID command above; update the board settings in wp2next.json; make a new token |
| Contact in HubSpot has no page history | The visitor declined cookies, or the HubSpot tracking code isn't on the site | Expected for visitors who decline |
wp2next doctor checks that every key the chosen destinations need is stored (it never shows the
values). For other problems see Troubleshooting.
At handover
wp2next handoff walks through it: the business owns the Resend, HubSpot and monday.com accounts; the
builder's access is removed; keys the builder ever saw are replaced (new Resend key, rotated HubSpot
service key, new monday.com token), stored, pushed to Vercel and tested with one more submission.
Related guides
- Secrets: where wp2next keeps passwords and API keys: where keys are stored
- Accounts and plans: accounts the project needs
- Compliance: privacy, consent, accessibility and form checks: consent wording and privacy checks for forms
- Handing a site over to the client: handing the site to the business