Guide
Automation Guide
Integration Guide
Template Guide
Reference
Automation Triggers
Automation Actions
Integrations
Node Resources
Database Views
Database Fields
Dashboard Widgets
Missions
Ai Wizard
Formula
Space
Release Notes
This automation feature allows users to execute code snippets in specified programming languages. Currently, we support the following three programming languages: JavaScript, TypeScript, and Python.
To use this feature, users need to prepare the script files, which should be written in JavaScript, TypeScript, or Python.
Users can write scripts directly in the BIKA script editor. Please note that the programming language used by the script must be clearly specified: JavaScript, TypeScript, or Python.
Follow these steps to configure the "Run Script" action in the BIKA automation interface:
JavaScript and TypeScript:
We provide support for libraries such as fetch
, axios
, and lodash
.
JSON data can be returned to the automation workflow.
Example code:
const str = 'Hello, World!';
const json = { str };
json;
For asynchronous functions, it is recommended to encapsulate them in an async function
and use the return
keyword to return data.
Example code:
(async () => {
const url = 'https://api.exchangerate-api.com/v4/latest/USD';
const response = await fetch(url);
if (!response.ok) {
throw new Error(response.status);
}
return await response.json();
})();
Python:
Supported libraries include numpy
, httpx
, bs4
, and pandas
.
The requests
library is not supported.
All return variables will be output to the automation workflow.
Example code:
import httpx
url = 'https://api.exchangerate-api.com/v4/latest/USD'
r = httpx.get(url)
data = r.json()
Add a new action on the automation task editing page and select "Run Script" from the list of action types.
Choose the script language: JavaScript, TypeScript, or Python.
In the "Script Content" area, enter the script code. For example, you could run a simple Python script to print "Hello World":
print("Hello World")
Save and Enable: After completing the script setup, click "Save" to save the action.
2。 Check the Results: After the script execution, you can confirm the output by reviewing the run history. If the script runs smoothly and returns the expected results, the configuration is correct.
With this, the configuration and execution of the "Run Script" automation action have been successfully completed.
Coming soon
Coming soon