產品指南
基礎
自動化指南
集成指南
AI應用與模板指南
Open API
功能參考
自動化觸發器
自動化執行器
第三方集成
節點資源
數據表視圖
數據表字段
儀表板組件
智能任務
AI 向導
公式
空間站
更新日誌
Videos
運行腳本操作指南
該自動化功能允許用戶在指定的編程語言環境中執行代碼片段。目前,我們支援以下三種編程語言: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;
-
-
對於異步函數,建議將其封裝於
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(); })();
-
-
-
Python:
-
本地支援的庫有
numpy
、httpx
、bs4
和pandas
。 -
不支援
requests
圖庫。 -
所有的回傳變量都會被輸出至自動化工作流程。
-
示例代碼:
import httpx url = 'https://api.exchangerate-api.com/v4/latest/USD' r = httpx.get(url) data = r.json()
-
-
3. 設定自動化動作
-
在自動化任務編輯頁面新增一個新的動作,然後在動作類型清單中選擇“運行腳本”。
-
選擇腳本語言:JavaScript、TypeScript 或 Python。
-
在“腳本內容”區域輸入腳本代碼。例如可以運行一個簡單的 Python 腳本來印出“Hello World”:
print("Hello World")
-
保存並啟用:完成腳本設定後,請點擊“保存”來保存動作。
4. 执行測試運行
-
執行測試:
- 返回至自動化任務界面。
- 點擊界面底部的“立即運行”按鈕,系統將會根據您的配置執行腳本。
-
檢查結果:腳本執行完畢後,您可通過查看運行歷史記錄來確認輸出結果。若腳本順利執行並回傳了預期的結果,則表示配置無誤。
至此,已成功完成「運行腳本」自動化動作的配置與運行。

推薦閱讀
推薦AI自動化模板

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

Business Development CRM
A business development CRM template to manage partnership opportunities, track partner details, log interactions, and organize contact information for streamlined collaboration

SEO 內容行銷
內容行銷對 SEO 結果至關重要。此模板優化您的策略,追蹤內容生產,激發新想法,將內容與 SEO 關鍵字和受眾對齊,並管理活動工作流。

承包商/自由职业者管理
承包商/自由职业者管理模板简化了从筛选到完成的管理。集中资源管理,链接任务,自动化面试反馈邮件,并跟踪项目费用以实现透明度和预算控制。

承包商时间追踪器
承包商时间追踪器通过连接表格简化任务、人员和客户跟踪,提高项目管理的效率和准确性。

Course Scheduling
Scheduling class is a complicated process, involving checking multiple worksheets and preparing timetable. In order to arrange schedules effectively, it is important to centralize all of the information including courses, rooms, classes into one intuitive system.