This workflow automates the process of fetching agricultural transaction data from the Taiwan Agricultural Products Open Data Platform and storing it in a Google Sheets document for further analysis.
Key Features
- Manual Trigger: Allows manual execution of the workflow to control when data is fetched.
- HTTP Request: Sends a request to the Open Data Platform's API to retrieve detailed transaction data, including:
- Pricing (Upper, Middle, Lower, Average)
- Transaction quantities
- Crop and market details
- Split Out Node: Processes each record individually, ensuring accurate handling of every data entry.
- Google Sheets Integration: Appends the data into a structured Google Sheets document for easy access and analysis.
Node Configurations
1. Manual Trigger
- Purpose: Start the workflow manually.
- Configuration: No setup needed.
2. HTTP Request
- Purpose: Fetch agricultural data.
- Configuration:
- URL:
https://data.moa.gov.tw/api/v1/SheepQuotation
- Query Parameters:
Start_time
: 2024/12/01
End_time
: 2024/12/31
MarketName
: 台北二
api_key
: <your_api_key>
- Headers:
3. Split Out
- Purpose: Split the API response data array into individual items.
- Configuration:
4. Google Sheets
- Purpose: Append the data to Google Sheets.
- Configuration:
- Operation:
Append
- Document ID:
<your_document_id>
- Sheet Name:
Sheet1
- Mapped Fields:
TransDate
, TcType
, CropCode
, CropName
, MarketCode
, MarketName
Upper_Price
, Middle_Price
, Lower_Price
, Avg_Price
, Trans_Quantity
此 Workflow 從 台灣農業產品開放資料平臺 獲取農產品交易數據,並將其儲存到 Google Sheets 文件 中進行進一步分析。
主要功能
- Manual Trigger:允許手動執行工作流程,以控制數據獲取的時間。
- HTTP Request:向開放資料平臺的 API 發送請求,獲取詳細的交易數據,包括:
- 價格 (Upper, Middle, Lower, Average)
- 交易數量
- 作物和市場詳細資料
- Split Out Node:逐筆處理每一筆記錄,確保數據準確無誤。
- Google Sheets Integration:將數據追加到結構化的 Google Sheets 文件中,方便存取和分析。
節點設定
1. Manual Trigger
2. HTTP Request
- 用途:抓取農產品數據。
- 設定:
- URL:
https://data.moa.gov.tw/api/v1/SheepQuotation
- 查詢參數 (Query Parameters):
Start_time
: 2024/12/01
End_time
: 2024/12/31
MarketName
: 台北二
api_key
: <your_api_key>
- 標頭 (Headers):
3. Split Out
- 用途:將 API 回應的數據陣列分解為個別項目。
- 設定:
4. Google Sheets
- 用途:將數據追加至 Google Sheets。
- 設定:
- Operation:
Append
- Document ID:
<your_document_id>
- Sheet Name:
Sheet1
- 映射欄位 (Mapped Fields):
TransDate
, TcType
, CropCode
, CropName
, MarketCode
, MarketName
Upper_Price
, Middle_Price
, Lower_Price
, Avg_Price
, Trans_Quantity
請多利用 Curl Import 功能
例如
curl -X GET "https://data.moa.gov.tw/api/v1/AgriProductsTransType/?Start_time=114.01.01&End_time=114.01.01&MarketName=%E5%8F%B0%E5%8C%97%E4%BA%8C" -H "accept: application/json"
農業資料開放平台 文件