Split In Batches node currentRunIndex example — n8n ワークフロー
概要
This workflow demonstrates how to use currentRunIndex to get the running index.
Function node: This node generates mock data for the workflow. Replace it with the node whose data you want to split into batches.
SplitInBatches node: This node splits the data with the batch size equal to 1. Based on your use-case, set the value of the Batch Size.
IF node: This node checks the running index. If the running index equals 5 the node returns true and breaks the loop. The node uses the expression {
使用ノード
ワークフロープレビュー
仕組み
- 1
トリガー
このワークフローは トリガー トリガーで開始します。
- 2
処理
データは 5 個のノードを流れます, connecting function, if, manualtrigger。
- 3
出力
ワークフローは自動化を完了し、設定された宛先に結果を配信します。
ノード詳細 (5)
On clicking 'execute'
manualTrigger
Function
function
SplitInBatches
splitInBatches
IF
if
Set
set
このワークフローのインポート方法
- 1右側の JSONをダウンロード ボタンをクリックしてワークフローファイルを保存します。
- 2n8nインスタンスを開き、ワークフロー → 新規 → ファイルからインポート に進みます。
- 3ダウンロードした
split-in-batches-node-currentrunindex-exampleファイルを選択し、インポートをクリックします。 - 4各サービスノードの 認証情報(APIキー、OAuthなど)を設定します。
- 5ワークフローをテスト をクリックして動作確認し、有効化します。
またはn8nの JSONからインポート に直接貼り付け:
インテグレーション
作成者
Harshil Agrawal
@harshil1712