Page Name Is not there in Email Notification




We are using Hubspot contact form to capture user data and submitting it using Rest API and we used to get email notification for each submission. It was working fine until now.

Earlier we used to get Page name on Page submitted on: But now are only getting Not included in API data I have attached screenshot of emails

Although we haven’t changed anything in the code.

Here following is NodeJS code which I am currently using = function (req, res) {
    var body = req.body;
    var hubspotPage = req.query.hubspotPage || 'Hubspot form submission';
     body = _.extend(req.body, {
        'hs_context': JSON.stringify({
            "hutk": req.cookies.hubspotutk || '',
            "ipAddress": req.headers['x-forwarded-for'] || req.connection.remoteAddress,
            // "pageUrl": "",
            "pageName": hubspotPage + " " + req.query.hubspotContent
    var postData = querystring.stringify(body);
    var path = "7d89dbbf-6303-423d-9865-f66e7dec102f";
    var options = {
        hostname: '',
        path: '/uploads/form/v2/MY_HUBSPOT_ID/' + path,
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Content-Length': postData.length

    var request = https.request(options, function (response) {
        console.log("Status: " + response.statusCode);
        console.log("Headers: " + JSON.stringify(response.headers));
        response.on('data', function (chunk) {
            console.log('Body: ' + chunk)

    request.on('error', function (e) {
        console.log("Problem with request " + e.message)

    request.on('close', function (e) {
            message: 'Success'

    // post the data




Hi @Lakshman_Gurung,

Can you send me a link to the form in HubSpot so that I can take a look at the raw form submission data?


Hi @Derek_Gervais,

Here is the link

when you click on download button it will open a form inside the popup.


Hi @Lakshman_Gurung,

I wasn’t entirely clear. I need a link to the form as it appears in your HubSpot portal. You could also just send me your Hub ID and I can find your portal that way.


Hi @Derek_Gervais

Here is my for id

and My Hub ID is 763528


Hi @Lakshman_Gurung,

It looks like the field you’re submitting in the form hs_context is pageName, when I believe you have to include pageTitle. Can you try updating the form to submit pageTitle instead?


Hi @Derek_Gervais ,

I have tried after adding pageTitle but still it’s not working.


Hi @Lakshman_Gurung,

That’s strange. I’m going to conduct some testing today to try and figure out what the issue is. I’ll reach back out here when I have some more information.


Hi @Lakshman_Gurung,

Thank you for your patience here. After doing some testing, including I was able to get the email working correctly by including a pageTitle and a pageUrl parameter to the hs_context field. If that’s not working for you, can you double check that the hs_context parameter is properly encoded (also not double-encoded)? If you find that you’re including everything correctly and you’re still not seeing the page appear correctly, can you send me the raw form submission data you’re pushing to HubSpot so that I can take a look?