返回 Skill 列表
extension
分类: 开发与工程无需 API Key

multi-source-data-integration-workflow

当用户需要一个端到端的工作流程,该流程整合来自多个来源(金融API、本地文件)的数据,并输出到协作工具(如Google Sheets、Notion)时,此技能会编排整个管道,包括读取模板格式、获取外部数据、处理和转换数据、写入云端电子表格以及更新项目管理工具。触发条件包括涉及'检索数据并记录在'、'使用数据创建表单'或跨多个平台具有特定格式要求的工作流程等复杂请求。

person作者: jakexiaohubgithub

Instructions

1. Understand the Request & Parse Requirements

  • Identify the target stocks/tickers, date range, and required data fields (e.g., Open, High, Low, Close, Volume).
  • Confirm the user wants original prices (auto_adjust: false), not adjusted prices.
  • Identify the target output Google Sheet name and specific worksheet name.
  • Identify the target Notion page and the exact notification message/comment to add.

2. Read the Format Template

  • Locate and read the example file (e.g., example.csv) provided by the user to understand the required column order and data format.
  • The standard format is: Ticker,Date,Open,High,Low,Close,Volume.

3. Create and Prepare the Google Sheet

  • Create a new Google Spreadsheet with the requested title.
  • Rename the default first worksheet to the requested name (e.g., "Jun-Jul_2025").

4. Fetch Historical Stock Data

  • For each ticker, use the Yahoo Finance tool (yahoo-finance-get_historical_stock_prices) to fetch daily data for the specified date range.
  • CRITICAL: Set auto_adjust to false to get original prices.
  • The API automatically excludes non-trading days.

5. Process and Transform the Data

  • Consolidate data from all tickers into a single list.
  • Transform each data point to match the template format: [Ticker, Date (YYYY-MM-DD), Open, High, Low, Close, Volume].
  • Sort the consolidated list primarily by Date, then by Ticker to maintain a clean, chronological order grouped by ticker for each day.

6. Write Data to Google Sheet

  • Write the header row (Ticker,Date,Open,High,Low,Close,Volume) to cell A1 of the target worksheet.
  • Write the consolidated, sorted data rows starting from cell A2.
  • Obtain the final URL of the Google Sheet.

7. Update the Notion Page

  • Search for the target Notion page (e.g., "Quant Research") using the Notion API.
  • Once the correct page ID is found, append a new line containing the Google Sheet URL in the format: Google Sheet : {url}.
  • Add a comment to the top of that page with the exact text: "Monthly market data is ready. The reporting team can view it directly".

8. Final Verification

  • Confirm the data has been written to the Google Sheet correctly.
  • Confirm the Notion page has been updated with the URL and the top comment.
  • Inform the user that the workflow is complete.