Template catalog


Code Action basic example

Use this template to understand how the Code Action actually works.

image describing the tiledesk community chatbot

Customize this template quickly & easily with Tiledesk

Designed by

logo of the author of the chatbot published in the tiledesk community

Andrea Sponziello

Published on

17/2/2024

Last update on

17/2/2024

Share this template to:

Try the Chatbot

More about this template

Use this template to understand how the Code Action actually works.

I hope this is self-explanatory, while we'll be out with the documentation.

The basics are:

The language is actually Javascript.

Use context.attributes.KEY or context.attributes[KEY] to read the value of a flow attribute

Ex.

let age = context.attributes.age;

Use context.setAttribute(KEY, VALUE) to set the value of an attribute

Ex.

context.setAttribute('age', 35);

Tags

    #code

    #javaascript

    #nodejs

Integrations

Once designed, you can run your unlimited no-code chatbots on every communication channel of your choosing. Be it WhatsApp, Telegram or Facebook Messenger. With no further clicks or actions.