Google Tag Manager

Forum Discussion

tnguyen2620's avatar
tnguyen2620
Practitioner
31 days ago

Webhook campaign - How to add 'email_subscribe' to request body

Hi everyone, I'm looking to create a webhook campaign that send a POST request to a webhook URL with 'email_subscribe', 'push_subscribe' attributes in the body. 

I tried to use {{${push_subscribe}}} or {{${email_subscribe}}} in the body but look like Braze is not happy with this. I also tried {{custom_attribute.${email_subscribe}}} but still not working as "custom attribute 'email_subscribe' does not exist"

Do you know how I can achieve this. It look like the liquid {{${push_subscribe}}} or {{${email_subscribe}}} is not supported. 

A side question: I also want to send the Sms subscription group subscription status, look like it is supported but when I enter {{{sms.${subscribed_state.${<subscription_group_id>}}}}}, it shows "Invalid personalization variables". I know the subscription_group_id, any idea where I should put the id? 

Thank you

  • Manoj__'s avatar
    Manoj__
    31 days ago

    Hello tnguyen2620 AFAIK there is no in-built functionality to keep them in sync. You will have to create a separate logic to sync them.

  • Manoj__'s avatar
    Manoj__
    Specialist II

    Hello tnguyen2620  I just tested this and it seems to be working for me.
    Here is the setup of my webhook:


    I was able to receive the email address but I don't have the SMS enabled on my instance so couldn't test it.

  • Hi Manoj__ , thank you for your swift response. The sms_status does work for me, thank you so much. 

    However, for the email_subscribe, I'm looking at 'email_subscribe' attribute which takes either 1 out of 3 values : "opted_in", "subscribed" or "unsubscribed". Same for 'push_subscribe'. 

    What in your screenshot is the actual email address of the user. :) 

    • Manoj__'s avatar
      Manoj__
      Specialist II

      Hello tnguyen2620  Yes, the emai_subscribe optin status wouldn't work.  The workaround for this is to replicate this value in a custom attribute and use that value in webhook. 

      • tnguyen2620's avatar
        tnguyen2620
        Practitioner

        Hi Manoj__ , yes, that's one of the way I'm thinking of. Thank you. 

        I have tried creating a custom attributes called 'push_subscribe', is there a way to keep its value in sync with the user's attribute 'push_subscribe'?