HubSpot: Subscribe to newsletter only IF consent given

Hi,

I have created a workflow where contacts are automatically added to our HubSpot CRM. In the form they fill out, they have to give consent whether they would like to receive a newsletter.

However, how can I add a ‘If consent = yes, then subscribe’ check between modules 9 and 12? The consent comes via a checkbox from a Google form.

I tried the “Filter” feature but it did block everything in my case.

Thanks

What input and output are you getting in Module 9? What’s the difference between givin consent and not giving consent in your input data? If it’s that the “consent” infor is present, try “if exists” instead of “if consent = 1”.

L

Module 9 gets input from a Google Form. 1 Bundle with several values (Name, EMail, Phone, Address, …). And Module 9 saves these inputs to HubSpot. However, there is one checkbox asking “Can we send you our newsletter” and if they select the checkbox I get I “Yes” from that field via the Google Form.

OK, but what values does the module get? That’s where the filter happens, not on the Google Forms.

If you are getting “Yes” then something like “lower(consent) = yes” should work.

But once again, getting the actual input/output will help:

L

Hi @L_Duperval, sorry for not being clear in the first place.

So the Google Form outputs this:

            "101e0776": {
                "questionId": "101e0776",
                "textAnswers": {
                    "answers": [
                        {
                            "value": "Yes"
                        }
                    ]
                }
            },

“Yes” indicates that the checkbox was selected.

Module 9 gets this input:

[
    {
        "city": "xxx",
        "email": "xxxx",
        "_method": "all",
        "company": "xxx",
        "country": "xxx",
        "firstname": "xxx",
        "swapPrimaryEmail": false,
        "parseCustomFields": true,
        "dsgvo_einwilligung_datenverarbeitung": true
    }
]

Module 12 gets this:

[
    {
        "email": "xxxx",
        "legalBasis": "LEGITIMATE_INTEREST_CLIENT",
        "subscriptionId": "xxxxxx",
        "legalBasisExplanation": "[Collection]  Yes"
    }
]

The kind of filter I have tried was between module 9 and 12.

OK, so your filter needs to take this into account:


"101e0776": {
                "questionId": "101e0776",
                "textAnswers": {
                    "answers": [
                        {
                            👉🏽 "value": "Yes" 👈🏽
                        }
                    ]
                }
            },

You can check for that value in the filter between 9 and 12. You can also set a variable earlier in your flow that stores the value (either Yes or No) and check that value in the filter.

L

Just for documentary reasons. The way I described in the first post is not possible. HubSpot does not allow to change this status via the API. Workaround: Use a HubSpot Form instead of a Google Form.

3 Likes