Loading...
Loading...
Compare original and translation side by side
Running the **SyncDividends** workflow from the **dividend-tracking** skill...| Workflow | Trigger | Action |
|---|---|---|
| SyncDividends | "sync dividends", "update dividends", "dividend tracker" | CSV → Input Area → Click Button |
Running the **SyncDividends** workflow from the **dividend-tracking** skill...| 工作流 | 触发词 | 操作 |
|---|---|---|
| SyncDividends | "同步股息"、"更新股息"、"股息追踪" | CSV → 输入区域 → 点击按钮 |
| Column | Field | Source |
|---|---|---|
| A | Ticket | CSV Symbol |
| B | Dividends Received | Calculated: Quantity × Amount per share |
| C | Date | CSV Pay date (MM/DD/YYYY format) |
| D | DRIP | TRUE/FALSE |
| 列 | 字段 | 来源 |
|---|---|---|
| A | 股票代码 | CSV中的Symbol字段 |
| B | 已收到股息 | 计算得出:持股数 × 每股股息金额 |
| C | 日期 | CSV中的派息日期(格式为MM/DD/YYYY) |
| D | DRIP(股息再投资) | TRUE/FALSE |
| Column | Field |
|---|---|
| G | Fund Name |
| H | Ticker |
| I-T | Monthly amounts (JAN-DEC) |
| U | Total |
| 列 | 字段 |
|---|---|
| G | 基金名称 |
| H | 股票代码 |
| I-T | 月度金额(1月-12月) |
| U | 总计 |
notebooks/updates/dividend.csv| CSV Column | Use |
|---|---|
| Symbol | → Column A (Ticket) |
| Quantity | Used to calculate dividend received |
| Amount per share | Used to calculate dividend received |
| Pay date | → Column C (Date) - format as MM/DD/YYYY |
| Type | Margin/Cash (for aggregation) |
notebooks/updates/dividend.csv| CSV列 | 用途 |
|---|---|
| Symbol | → A列(股票代码) |
| Quantity | 用于计算已收到股息 |
| Amount per share | 用于计算已收到股息 |
| Pay date | → C列(日期) - 格式为MM/DD/YYYY |
| Type | 保证金/现金账户(用于聚合) |
Dividends Received = Quantity × Amount per share--已收到股息 = 持股数 × 每股股息金额--mcp__gdrive__sheets(
operation: "readSheet",
params: {
spreadsheetId: "{spreadsheet_id}",
range: "Dividends!A2:D43"
}
)mcp__gdrive__sheets(
operation: "readSheet",
params: {
spreadsheetId: "{spreadsheet_id}",
range: "Dividends!A2:D43"
}
)mcp__gdrive__sheets(
operation: "updateCells",
params: {
spreadsheetId: "{spreadsheet_id}",
range: "Dividends!A2:D13", // Adjust range based on record count
values: [
["JEPI", "$51.63", "01/05/2026", "TRUE"],
["JEPQ", "$78.62", "01/05/2026", "TRUE"],
// ... more records
]
}
)mcp__gdrive__sheets(
operation: "updateCells",
params: {
spreadsheetId: "{spreadsheet_id}",
range: "Dividends!A2:D13", // 根据记录数量调整范围
values: [
["JEPI", "$51.63", "01/05/2026", "TRUE"],
["JEPQ", "$78.62", "01/05/2026", "TRUE"],
// ... 更多记录
]
}
)// 1. Open Google Sheets
mcp__claude-in-chrome__tabs_create_mcp({
url: "https://docs.google.com/spreadsheets/d/{spreadsheet_id}/edit#gid=2068577140"
})
// 2. Wait for sheet to load
// 3. Look for "Add Dividend" button or custom menu
// 4. Click to trigger Apps Script// 1. 打开Google Sheets
mcp__claude-in-chrome__tabs_create_mcp({
url: "https://docs.google.com/spreadsheets/d/{spreadsheet_id}/edit#gid=2068577140"
})
// 2. 等待表格加载完成
// 3. 查找“Add Dividend”按钮或自定义菜单
// 4. 点击以触发Apps Script┌─────────────────────────────────┐
│ dividend.csv (Fidelity export) │
│ - Symbol, Quantity │
│ - Amount per share, Pay date │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ Calculate Dividends Received │
│ Qty × Amount = Total Dividend │
│ Aggregate by ticker │
│ Filter: only PAST pay dates │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ INPUT AREA (A2:D43) │
│ Write calculated dividends │
│ Max 42 records per batch │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ CLICK "Add Dividend" BUTTON │
│ (Browser automation or manual) │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ HISTORICAL LOG (G4+) │
│ Apps Script processes input │
│ Appends to monthly columns │
└─────────────────────────────────┘┌─────────────────────────────────┐
│ dividend.csv (Fidelity导出文件) │
│ - Symbol, Quantity │
│ - Amount per share, Pay date │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ 计算已收到股息 │
│ 持股数 × 每股金额 = 总股息 │
│ 按股票代码聚合 │
│ 过滤:仅包含已过派息日期 │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ 输入区域(A2:D43) │
│ 写入计算后的股息数据 │
│ 每批次最多42条记录 │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ 点击“添加股息”按钮 │
│ (浏览器自动化或手动操作) │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ 历史日志(G4+) │
│ Apps Script处理输入内容 │
│ 追加至月度列 │
└─────────────────────────────────┘scripts/google-sheets/portfolio-optimizer/Dividend.jsscripts/google-sheets/portfolio-optimizer/Dividend.jsdividend.csvnotebooks/updates/dividend.csvnotebooks/updates/{spreadsheet_id}2068577140https://docs.google.com/spreadsheets/d/{spreadsheet_id}/edit#gid=2068577140{spreadsheet_id}2068577140https://docs.google.com/spreadsheets/d/{spreadsheet_id}/edit#gid=2068577140notebooks/updates/dividend.csvscripts/google-sheets/portfolio-optimizer/Dividend.jsnotebooks/updates/dividend.csvscripts/google-sheets/portfolio-optimizer/Dividend.js