Custom Actions Youtube Tutorial question

Hello Voiceflow team,

I'm reposting my question from the #šŸ’¬ā”ƒgeneral-chat channel here:

This is regarding custom actions.

Hi I'm following the custom action youtube tutorial for rendering custom actions and I noticed that last_event is returning null after I make a carousel selection. Is last_event still being populated after custom action step executes?

Video source: https://www.youtube.com/watch?v=2V46rOkkprg&t=130s

This is the javascript code I used from the tutorial:

const makeCard = (name, sku) => ({
 "title": name,
  "description": {
    "text": "something about tea 1"
  },
  "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Longjing_tea_steeping_in_gaiwan.jpg/1920px-Longjing_tea_steeping_in_gaiwan.jpg",
  "buttons": [
    {
      "name": "button " + name,
      "request": {
        // corresponds with the path selected
        "type": "tea_selected",
        "payload": {
          "sku": sku,
          "label": "button " + name,
          "actions": []
        }
      }
    }
  ] 
});

for (let i = 1;i <= 10; ++i) {
  carousel_dynamic.cards.push(makeCard(`tea ${i}`, `t-${i}`));
}

// must stringify json data so other nodes know the shape of this object
carousel_dynamic = JSON.stringify(carousel_dynamic);



// last_event returns null
tea_selection = JSON.stringify(last_event);
Was this page helpful?