模板帮助价格博客社区
联系我们
登录
产品
登录 & 注册
模板中心
集成
API 文档
支持
帮助中心
入门教程
产品路线图
品牌资料
隐私政策
用户条款
联系方式
社区
联系销售
公司
联盟计划
关于
AItool-PRO
© 2025 Copyright Bika.ai
twitterLinkedInmedium

运行脚本操作指南

该自动化功能允许用户在指定的编程语言环境中执行代码片段。目前,我们支持以下三种编程语言:JavaScript、TypeScript 和 Python。

配置步骤详解

为了使用此功能,用户需准备好相应的脚本文件,这些脚本应采用 JavaScript、TypeScript 或 Python 语言编写。

1. 编写脚本

用户可以直接在 BIKA 脚本编辑器中进行脚本的编写。请注意,必须明确指定脚本所使用的编程语言:JavaScript、TypeScript 或 Python。

2. 配置「运行脚本」动作

请按照以下步骤在 BIKA 自动化界面中配置「运行脚本」动作:

支持的语言及库

  • JavaScript 与 TypeScript:

    • 我们提供 fetch、axios 以及 lodash 等库的支持。

    • 可以将 JSON 数据返回至自动化流程中。

      • 示例代码:

        const str = 'Hello, World!';
        const json = { str };
        json;
        

        JavaScript 示例1

    • 对于异步函数,建议将其封装于 async function 中,并使用 return 关键字返回数据。

      • 示例代码:

        (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 示例2

  • Python:

    • 本地支持的库有 numpy、httpx、bs4 和 pandas。

    • 不支持 requests 库。

    • 所有的返回变量都会被输出至自动化工作流。

      • 示例代码:

        import httpx
        url = 'https://api.exchangerate-api.com/v4/latest/USD'
        r = httpx.get(url)
        data = r.json()
        

        Python 示例

3. 设置自动化动作

  1. 在自动化任务编辑页面添加一个新的动作,并在动作类型列表中选择“运行脚本”。

  2. 选择脚本语言:JavaScript、TypeScript 或 Python。

  3. 在“脚本内容”区域输入脚本代码。例如可以运行一个简单的 Python 脚本来打印“Hello World”:

    print("Hello World")
    
  4. 保存并启用:完成脚本设置后,请点击“保存”来保存动作。

4. 执行测试运行

  1. 执行测试:

    • 返回至自动化任务界面。
    • 点击界面底部的“立即运行”按钮,系统将会依据您的配置执行脚本。
  2. 检查结果:脚本执行完成后,您可以通过查看运行历史记录来确认输出结果。若脚本顺利执行并返回了预期的结果,则表示配置无误。

至此,已成功完成了「运行脚本」自动化动作的配置与运行。

call to action

推荐阅读

  • AI Brand Designer: The Ultimate Assistant for Product Launch Campaigns
  • AI-Powered Brand Content Creation: How Smart Tools Are Changing Marketing
  • Best AI Slogan Generators for Startups in 2025: Create Your Brand Identity Instantly
  • What Is Dynamic AI Agents? Everything You Should Know
  • What Is an AI Agent? The Complete Beginner’s Guide (2025 Edition)
推荐AI自动化模板
Business Contract Management
Business Contract Management
The challenges in traditional contract management, such as dispersed information, difficulty in tracking, repetitive data entry, and lack of transparency in status, have been addressed. This effectively helps teams efficiently manage the contract lifecycle, reduces manual operations, and improves data accuracy and team collaboration efficiency
Investor deal flow
Investor deal flow
Streamline your investment tracking with Bika.ai’s Investor Deal Flow template. Manage prospective deals, company contacts, and transaction details efficiently through a centralized dashboard. Track deal pipelines, monitor deal progress, and analyze deal analytics to improve management efficiency and ensure timely decision-making. Ideal for sales teams, investment firms, entrepreneurs, and business development teams seeking a complete deal management solution.
法律案件追踪与账单管理
法律案件追踪与账单管理
该文件夹用于集中管理与法律案件相关的所有信息,包括案件进展、客户沟通、以及相关的账单和费用记录。
IT 资产管理与提醒
IT 资产管理与提醒
全面的 IT 资产管理解决方案,用于发送维护提醒
Interview Questions
Interview Questions
Streamline your hiring process with Bika.ai’s Interview Questions template. Create and manage interview forms, checklists, and tables while automating reminders and task assignments. Evaluate candidates’ management style, cultural fit, and key weaknesses efficiently. With a centralized recruitment dashboard, monitor candidate selection, track interview feedback, and optimize your recruitment strategy. Ideal for HR leaders, recruiters, and hiring teams seeking a smart, automated way to improve hiring efficiency and ensure precise talent screening.
PR & media CRM
PR & media CRM
Streamline your PR and media management with this PR & Media CRM template. Organize journalist contacts, track press coverage, manage relevant articles and publications, monitor PR campaigns, and enhance outreach efficiency. Use PR analytics, communication tracking, and workflow automation to improve engagement, optimize media performance, and build strong public relations.
运行脚本操作指南
配置步骤详解
1. 编写脚本
2. 配置「运行脚本」动作
3. 设置自动化动作
4. 执行测试运行