Bika
GuideAutomation

Run Script

Run Script Action Guide

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.

Detailed Configuration Steps

To use this feature, users need to prepare the script files, which should be written in JavaScript, TypeScript, or Python.

1. Writing the Script

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.

2. Configuring the "Run Script" Action

Follow these steps to configure the "Run Script" action in the BIKA automation interface:

Supported Languages and Libraries

  • 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;

        JavaScript Example1

    • 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();
        })();

        JavaScript Example2

  • 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()

        Python Example

3. Setting Up the Automation Action

  1. Add a new action on the automation task editing page and select "Run Script" from the list of action types.

  2. Choose the script language: JavaScript, TypeScript, or Python.

  3. 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")
  4. Save and Enable: After completing the script setup, click "Save" to save the action.

4. Perform a Test Run

  1. Execute the Test:
  • Return to the automation task interface.
  • Click the "Run Now" button at the bottom of the page, and the system will execute the script according to your configuration.

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.

Recommend AI Automation Templates
Daily Standup(Wecom)
Daily Standup(Wecom)
Automate your daily standup process with this powerful Daily Standup Template. Improve work progress tracking, streamline team check-ins, and eliminate manual updates through AI-powered workflows. With built-in daily task reminders, smart scheduling, and an advanced AI report generator for daily and weekly summaries, this template helps teams achieve true workday automation and stay aligned effortlessly.
Base CRM
Base CRM
Base Template in Every New Space
Customer Support Scribe
Customer Support Scribe is an AI tool designed to automate customer support and improve AI customer communication. It works as an FAQ generator and SOP generator, streamlining helpdesk automation with professional, ready-to-use support templates for teams.
Legal Case Tracking and Billing
Legal Case Tracking and Billing
Streamline your legal workflow with the Legal Case Tracking and Billing Management template. Designed for law firms to efficiently manage cases, clients, and billing, it integrates lawyer time tracking, law firm billing, and expense management into one system. Automate communications, track case progress, and simplify law firm finance operations. Perfect for lawyers, managers, and accounting teams seeking better legal data management and law office automation.
Automation Call to Third-Party AI Platform for Text-to-Speech
Automation Call to Third-Party AI Platform for Text-to-Speech
This template lets you automatically convert text to MP3 by calling a third‑party AI text‑to‑speech platform. Store scripts, lessons, or support content in a table, switch the status to start conversion, and get MP3 files back in the record without any manual audio editing. Use it for video narration, online courses, podcast scripts, product demos, and language learning audio so creators, educators, and training teams can scale content production with a simple, automated text‑to‑speech workflow.

Coming soon

Automated Currency Data Retrieval (Python)
Automated Currency Data Retrieval (Python)
The Automated Currency Data Retrieval (Python) template runs a scheduled job to fetch specific currency rates every day and store them in a structured table, building clean historical exchange rate data over time. Use it for financial data automation that powers dashboards, alerts, and automated financial reporting, so finance teams, forex traders, accountants, and risk managers always have up-to-date FX data at hand. By automating data collection, you save time, reduce manual errors, and make better investment and risk decisions based on reliable exchange rate history.