AutomationFlowsGeneral › Set Item Index in n8n Workflow (n8nTraining Datastore)

Set Item Index in n8n Workflow (n8nTraining Datastore)

Original n8n title: Demonstrates the Use of the Item Index Method

Demonstrates The Use Of The Item Index Method. Uses manualTrigger, n8nTrainingCustomerDatastore, httpRequest. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexity4 nodesN8N Training Customer DatastoreHTTP Request
General Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "position": [
        450,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "apiKey",
              "value": "n8n-secret-keey"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "name": "Customer Datastore",
      "type": "n8n-nodes-base.n8nTrainingCustomerDatastore",
      "position": [
        650,
        300
      ],
      "parameters": {
        "operation": "getAllPeople",
        "returnAll": true
      },
      "typeVersion": 1
    },
    {
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        850,
        300
      ],
      "parameters": {
        "url": "https://webhook.site/f99d65ab-8959-4466-a427-cdd0ad482220",
        "options": {},
        "requestMethod": "POST",
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "name",
              "value": "={{$json[\"name\"]}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": [
            {
              "name": "api-key",
              "value": "={{ $item(0).$node[\"Set\"].json[\"apiKey\"] }}"
            }
          ]
        }
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Set": {
      "main": [
        [
          {
            "node": "Customer Datastore",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Datastore": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Demonstrates The Use Of The Item Index Method. Uses manualTrigger, n8nTrainingCustomerDatastore, httpRequest. Event-driven trigger; 4 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

example_1. Uses n8nTrainingCustomerDatastore. Event-driven trigger; 6 nodes.

N8N Training Customer Datastore
General

Product - Google Search Console API Examples. Uses httpRequest. Event-driven trigger; 36 nodes.

HTTP Request
General

Multi-Service Screenshot Scraping: ScraperAPI, Scrapingdog, & ScreenshotOne. Uses manualTrigger, httpRequest, stickyNote, dateTime. Event-driven trigger; 13 nodes.

HTTP Request
General

n8n Asynchronous Workflow with Wait Node POC. Uses manualTrigger, executeWorkflowTrigger, executeWorkflow, httpRequest. Event-driven trigger; 12 nodes.

Execute Workflow Trigger, HTTP Request
General

Media Sync (Local HDD → Google Drive). Uses localFileTrigger, readWriteFile, googleDrive, httpRequest. Event-driven trigger; 9 nodes.

Local File Trigger, Read Write File, Google Drive +1