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
Business Development CRM
Business Development CRM
Streamline your business development CRM with a powerful business development template designed for effective partner management and opportunity tracking. Use this system to manage business relationship management workflows, organize key contacts, and centralize all partner information in one place. Track the full business development process and business development workflow—from initial outreach to signed partnership deals—while keeping interactions, contracts, and opportunities aligned. Ideal for teams that need a structured way to manage partnerships, improve collaboration, and stay on top of every opportunity in their pipeline.
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.
Business Contract Management
Business Contract Management
Streamline your entire contract lifecycle with the Business Contract Management template. This centralized contract management system serves as an all-in-one contract database and centralized contract repository for tracking contract details, approvals, and activities. Automate key processes through a contract approval workflow and contract workflow management, ensuring accuracy, transparency, and collaboration across teams. Ideal for project contract management, this template simplifies service request tracking, reduces manual work, and improves efficiency from contract submission to expiration reminders.
X/Twitter Manager
An AI-powered Twitter Assistant that helps content creators draft viral tweets with auto-polish, generate tweet ideas, and schedule posts using one-click automation. Grow your engagement and effortlessly boost your Twitter follower growth.
Batch generation of HeyGen AI videos
Batch generation of HeyGen AI videos
Quickly generate high-quality HeyGen AI videos with batch generation and automated video workflow. Customize characters and voices, streamline video creation, and save time.
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.