Clay Icon

Automating Lead Response Tracking in HeyReach Webhook for Clay

·
·

Hi All, I need help with a HeyReach to Clay webhook. I want to pull through the response from the lead, however I can't know when in the sequence the response will be, the recent messages can be as many as 7+. This is because we send follow ups if they don't respond. So the lead might respond straight away (2 messages total) or after we send 5 messages (6 messages total)- I have a table where I extract the reply and run an enrichment to categorise it (interested, not interested etc). Is there a way I can add a column automatically based on 'is reply: true'?

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    💤 You've caught us outside of our support hours (9am-9pm EST), but don't worry - we'll be back in touch within 24 hours (often sooner!). If you haven't already, please include the URL of your table in the thread below so that we can help you as quickly as possible!

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    I've tried to run a formula but I can't get it to only extract the message if the 'is_reply' is true

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    This formula seems to be stable, but if there is a better way of doing this then I'm all ears

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    Write a formula Extract the message field if is_reply field is true and it should see all the 7 fields and will help you extract message where is_reply would be true, does that work? Plain simple JS.

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    Yeah I tried that but it wouldn't extract from all of them unfortunately, I tried a few formula variates with no luck

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    This should work. If you could give me the whole JSON structure of the cell I can write you a formula that will fix

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    In the following list / find the messages with the is_reply value 'true' and extract only those message

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    it works

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    and it should work

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    BTW, check the one where it is not

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    there has to some issue with the JSON there

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    it's not working on any of them

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    they are all the first message I sent, rather than the reply

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    sweet

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    Can you change the is_reply to is Reply?

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·
  • Avatar of Will Y.
    Will Y.
    ·
    ·

    Same thing, doesn't work

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    i am going to fix the formula for you

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    i am seeing an issue

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    JSON.stringify({{Webhook}}?.recent_messages?.filter(message => message?.['is reply'] === true))

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    brilliant thank you. The is_reply should be true btw

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    try this

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    still not working, pulls through the first message, not the reply

  • Avatar of Will Y.
    Will Y.
    ·
    ·
  • Avatar of Will Y.
    Will Y.
    ·
    ·

    I have a meeting at half bast fyi if I go radio silent

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    its ok, did you try clicking output is correct, save formula?

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    if it still does not work, create a new formula field and past the formula there

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    if still does not work, DM me , i will let you know how to get the JSOn structure and once you get me the JSON structure I will give you exact formula

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    yes, but that still didn't work

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·
    JSON.stringify({{Webhook}}?.recent_messages?.filter(message => message['is reply'] === true).map(message => message.message))

    please try this last one

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    you are close

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    output for the last 2

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·
    JSON.stringify({{Webhook}}?.recent_messages?.filter(message => message['Is Reply'] === true).map(message => message.message))
  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    Made a slight change that could potentially make a big difference

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    nah that's not working

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    lol

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    I think I've figured out a way

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    great

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    Insted of formula, I'm using 'ask question'

  • Avatar of Will Y.
    Will Y.
    ·
    ·
  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    It uses a credit.

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    I have open AI

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    sweet

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    Thanks for the help though

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    ofc

  • Avatar of Arturo O.
    Arturo O.
    ·
    ·

    Hey Will, thanks for the inquiry, happy to look into it! Do you mind sending the link to the table so we can take a look? https://downloads.intercomcdn.com/i/o/1171717996/ac7729f84b426e1d0358af02/image.png?expires=1727114400&signature=7cce0a4092811854dd3f1f2168655cc40cf1d76d06dbcb622b353e930dde880f&req=dSEgF85%2FmohWX%2FMW1HO4zYTywCz9B5MS2BKsam%2FhVPsHiA%3D%3D%0A Appreciate you jumping in there as well, Muhammad! Also, quick question, Will. Within HeyReach, what triggers it to send the webhook to Clay? If possible, it would be best to ensure you have a filtered view in that platform where you only see actual replies and on what step, making sure those are part of the values that get imported into Clay to then further analyze.

  • Avatar of Will Y.
    Will Y.
    ·
    ·

    Hi Arturo, I've found a good solution which is working for me so no need to work on it now but thanks

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Hi Will Y.! This thread was recently closed by our Support team. If you have a moment, please share your feedback: