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
Requirements Document Writer
Create professional requirements documents instantly with AI. Generate complete requirements templates, project requirements, and user requirements with detailed acceptance criteria and product specifications. Perfect for product managers and project teams.
3-Day Outreach Email Campaign
3-Day Outreach Email Campaign
Quickly launch a 3-day automated email outreach campaign with this ready-to-use email outreach template. Run an email drip sequence of automated welcome emails for new users to boost activation, retention, and early engagement. This workflow helps you send the right message on each of the first three days, pause the sequence when users reply, and avoid over-contacting them. Ideal for customer success teams, SaaS product managers, marketers, and startup founders who want a simple, automated way to guide new users into your product.
Automated Currency Data Retrieval (JavaScript)
Automated Currency Data Retrieval (JavaScript)
The Automated Currency Data Retrieval (JavaScript) template runs daily jobs to fetch exchange rates and write them into a table, giving you clean, structured historical exchange rate data without manual copy‑paste. Use it for financial data automation that feeds dashboards, alerts, and automated financial reporting, so finance teams, forex traders, accountants, and analysts always have up‑to‑date FX data. Over time, the template becomes a lightweight risk management tool by helping you monitor currency movements, spot trends, and support better investment and hedging decisions.
OKR Tracking
OKR Tracking
Easily manage and track your company's Objectives and Key Results with our OKR Tracking template. Visualize progress through the OKR dashboard, monitor objective completion, align team goals, and generate automated OKR reports for quarterly reviews. Ideal for project management, team performance tracking, and improving organizational productivity.
14-Day Automated Cold-Email Outreach Campaign
14-Day Automated Cold-Email Outreach Campaign
Launch a 14-day automated cold outreach campaign with this done-for-you email outreach template. Run a fully automated email sequence and drip email sequence for outbound email campaigns and outbound sales emails, complete with automated follow ups and lead nurturing emails. Use a clear email campaign workflow to manage automated email outreach, track engagement, and scale cold outreach to influencers, partners, and prospects—without manual follow-ups.
Assortment Planning
Assortment Planning
The Assortment Planning template is a retail assortment planning solution that helps you manage product assortment planning across categories, seasons, and channels. Use it as a centralized product catalog management system and manufacturer database to support supplier relationship management and retail product management. Track pricing, costs, and product margin analysis, organize your product portfolio planning with clear categories and color variants, and use built‑in category management tools to keep assortments optimized for every store or sales channel.