La communauté HubSpot est disponible en français.

"Email Email" isn't a valid email address on Form submissions via Forms API

Contributeur occasionnel

We're seeing a weird error message on all form submissions, see screenshot:

Error message: This value wasn't passed to the contact record. '' isn't a valid email address.

Despite throwing an error notification, the form submission seems to be correctly attaching itself to the user with the non-duplicated version of their email address. Afaik, we haven't changed the way we use the Forms API and we never saw this error messages until about ~1 month ago.

Is anybody else seeing this issue? Any ideas on how to solve this?

0 Vote / Votes
Salarié HubSpot

Hi @nicolai - Can you provide more detail about the actual request that's being made (particularly the raw request URL, headers, and body)

0 Vote / Votes
Contributeur occasionnel


opening connection to
starting SSL for
SSL established
<- "POST /uploads/form/v2/1551245/41aa66ed-e3d8-4343-babf-50a1774ee439 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nConnection: close\r\nHost:\r\nContent-Length: 2035\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n"
<- "birth_day=3&birth_month=2&birth_year=2004&code=&cohort_id=QU1TQ29ob3J0LTU2&cohort_name=San+Francisco+Summer+Academy&{}"
-> "HTTP/1.1 302 \r\n"
-> "Date: Wed, 04 Jul 2018 00:14:05 GMT\r\n"
-> "Content-Length: 0\r\n"
-> "Connection: close\r\n"
-> "Set-Cookie: __cfduid=d415b9a6a85042364218fa055371eb4671530663245; expires=Thu, 04-Jul-19 00:14:05 GMT; path=/;; HttpOnly\r\n"
-> "Access-Control-Allow-Credentials: false\r\n"
-> "Cache-Control: max-age=0, no-cache, no-store\r\n"
-> "Location:\r\n"
-> "X-Trace: 2BFB7093332BC0F5D0314594D9363A3FE3649C86EB000000000000000000\r\n"
-> "Strict-Transport-Security: max-age=2592000\r\n"
-> "Expect-CT: max-age=604800, report-uri=\"\"\r\n"
-> "Server: cloudflare\r\n"
-> "CF-RAY: 434d63c4ec6b6d66-SJC\r\n"
-> "\r\n"
reading 0 bytes...
-> ""
read 0 bytes
Conn close
0 Vote / Votes
Salarié HubSpot

Hi @nicolai,

Looking at the request body, it appears that you are including the email parameter 2 times. If you do a search on that response for and you'll see it represented twice.

Your code should be fixed so that email is only included once in the request body.