0% found this document useful (0 votes)
2 views

How to use JavaScript _ Kicklet.app

The document provides guidance on using JavaScript within chat responses on Kicklet.app, allowing for enhanced flexibility. It includes examples of calling functions and retrieving variables from templates to generate dynamic content. The examples illustrate how to integrate JavaScript functionality seamlessly into the chat interface.

Uploaded by

tavindoabc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

How to use JavaScript _ Kicklet.app

The document provides guidance on using JavaScript within chat responses on Kicklet.app, allowing for enhanced flexibility. It includes examples of calling functions and retrieving variables from templates to generate dynamic content. The examples illustrate how to integrate JavaScript functionality seamlessly into the chat interface.

Uploaded by

tavindoabc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Skip to content

Kicklet.app
SearchK
Main Navigation HomeDocumentation

Appearance

Menu
On this page
Sidebar Navigation

Documentation
Introduction

Default Commands

JavaScript / Template

How to use JavaScript

Example Commands

Usage of API Token

On this page

• Call a function from template


• Get a variable from template

How to use JavaScript


In the chat responses, you can use a script tag and thereby utilize JavaScript, allowing for almost
limitless flexibility. In the chat responses, you can use a script tag and thereby utilize JavaScript,
allowing for almost limitless flexibility.

Call a function from template


In this example, "Hello world!" will be displayed in the response. The word "world" here is
sourced from the JavaScript section. This serves to illustrate how to use returned values from a
JavaScript function within the template.

js
<template>
Hello {{script.Call "testFunction"}}!
</template>

<script>
function testFunction() {
return 'world';
}
</script>

Get a variable from template


In this example, "Hello world!" is rendered as the output. The word "world" is obtained directly
from a JavaScript variable named "worldVariable". This demonstrates how to reference and
utilize JavaScript variables within the template.

js
<template>
Hello {{script.Var "worldVariable"}}!
</template>

<script>
let worldVariable = 'world';
</script>

Pager
Previous pageJavaScript / Template
Next pageExample Commands

You might also like