Guide
Basic
Automation Guide
Database
Integration Guide
Dashboard
Self-hosted
Open API
Business AI Agent Template
Cookbook
Reference
Automation Triggers
Automation Actions
Integrations
Node Resources
Database Views
Database Fields
Dashboard Widgets
Missions
Ai Wizard
Formula
Space
Release Notes
Videos

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.

bika cta

Recommend Reading

Recommend AI Automation Templates

发布模版test
再次发布
14-Day Automated Cold-Email Outreach Campaign
This template is designed for cold outreach to influencers, peers, or potential partners. It automates a 14-day email sequence that gradually introduces Bika.ai to your target audience and nurtures engagement. The workflow includes a series of five emails sent on Day 1, Day 2, Day 4, Day 7, and Day 14, with an unsubscribe option in each email. The sequence pauses if the recipient replies or unsubscribes, ensuring that you’re not over-communicating with uninterested prospects. With this template, you can: - Automate cold outreach without the need for manual follow-ups. - Track outreach progress and engagement. - Customize emails to reflect your brand’s voice and offerings. - Reduce manual work by automatically updating the status of email outreach. - Easily manage unsubscribes to maintain a compliant outreach process. 🔖Tip: Please replace the unsubscribe link in your email with the share link to the "Unsubscribe Form" you’ve created.
3-Day Outreach Email Campaign
Automate and schedule personalized outreach emails over three consecutive days to engage contacts effectively.

Coming soon

ADDIE Instructional Design Model
The ADDIE model is a simple process used by instructional designers and training developers to create all types of learning content, e-learning or instructor-led, for any organization
Agile Workflow
Streamlines project management for teams, enhancing collaboration and visibility in Agile practices
AI Automated Task Management
Helps teams efficiently manage weekly tasks. Through a series of automation tools, including task summaries, progress reminders, and personal summary reports, team members can promptly obtain task information and progress, thereby improving collaboration efficiency and work transparency. By using these automation features, teams can maintain efficient operations and ensure that each member has a clear understanding and sense of responsibility for their tasks.