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
Content Marketing for SEO
Content Marketing for SEO
Use the Content Marketing for SEO template as a powerful content strategy template to streamline SEO content management and content workflow management from idea to publication. This content marketing automation setup helps you align content with SEO keywords, manage personas for persona based marketing, and track every step in a visual content marketing dashboard and content performance dashboard. Improve online visibility by organizing topics, workflows, and campaigns in one place so your team can plan, produce, and optimize SEO content more efficiently.
AI Batch Image Recognition(OpenAI gpt-4o)
AI Batch Image Recognition(OpenAI gpt-4o)
Extract text from multiple images at once with Bika.ai's AI Batch Image Recognition. Supports OpenAI gpt-4o, batch processing, and automated image recognition for fast, accurate results.
Automated Stock Data Retrieval (Python)
Automated Stock Data Retrieval (Python)
The Automated Stock Data Retrieval (Python) template automatically fetches US stock data every day and writes it into a structured table, giving you clean, consistent time series for analysis. Use it as part of your financial data automation stack to power stock trend analysis, dashboards, alerts, and quantitative analysis data for models and backtests. Designed for financial analysts, investment managers, data scientists, quants, and portfolio managers, it saves time on manual data collection so you can focus on research, strategy, and better investment decisions.
Brand Designer
An AI-powered Brand Marketing Assistant specially designed for start-up digital products, helping you quickly generate promotional content, visual concepts, and catchy slogans for social media and product launch campaigns. Save time while creating professional marketing assets to boost your brand impact on Product Hunt, AppSumo, and other platforms.
AI Auto-Tweet with Image
Automate your X (Twitter) content with the AI Auto-Tweet with Image template. Use it as a Twitter post scheduler and Twitter automation tool that reads tweet content from your database, generates tweets with AI, uploads images, and auto-posts to X. Batch pre-write tweets, update their status to Publish, and let the workflow handle tweet scheduling, posting, and link tracking—perfect for social media managers, creators, and brands who want consistent Twitter activity without manual posting.
ADDIE Instructional Design Model
ADDIE Instructional Design Model
Use the ADDIE Instructional Design Model as a practical instructional design template to manage your entire course development process. Plan and track e‑learning content development, instructor‑led training design, and training materials development for professional skills courses and employee training programs. This template helps instructional designers, training developers, and education project managers organize tasks, align learning objectives, and streamline course creation for any organization.