← All N8N workflows
Automation & utilitiesCodeHTTP RequestIfRespond To WebhookEdit Fields

Get all scaleway server info copy

Configured with HTTP Request, Respond To Webhook, Loop Over Items, Split Out, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
CodeCodeCodeTransformEdit FieldsEdit FieldsRoutingSwitchSwitchCodeCode search TagsCodeCodeCode search NameCodeCodeCode search public_ipCodeCodeCode search zoneCodeTriggerWebhookWebhookWeb / APIRespond ErrorRespond To WebhookWeb / APIRespond to Webhook1Respond To WebhookWeb / APIRespond to Webhook2Respond To WebhookWeb / APIRespond to Webhook3Respond To WebhookWeb / APIRespond to WebhookRespond To WebhookWeb / APIGet Scalway MachinesHTTP RequestRoutingLoop Over ItemsLoop Over ItemsWeb / APIRespond to Webhook4Respond To WebhookWeb / APIGet scw instance byzoneHTTP RequestRoutingLoop Over Zone InstanceLoop Over ItemsWeb / APIGet scw baremetal byzoneHTTP RequestTransformSplit Out ZONE_INSTANCESplit OutRoutingIf ZONE_BAREMETAL inZONE_INSTANCEIf

Node categories in this workflow

  • Code
  • Transform
  • Routing
  • Trigger
  • Web / API

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
CodeCodeCodeSee node parameters
Edit FieldsTransformEdit FieldsSee node parameters
SwitchRoutingSwitchSee node parameters
Code search TagsCodeCodeSee node parameters
Code search NameCodeCodeSee node parameters
Code search public_ipCodeCodeSee node parameters
Code search zoneCodeCodeSee node parameters
WebhookTriggerWebhookSee node parameters
Respond ErrorWeb / APIRespond To WebhookSee node parameters
Respond to Webhook1Web / APIRespond To WebhookSee node parameters
Respond to Webhook2Web / APIRespond To WebhookSee node parameters
Respond to Webhook3Web / APIRespond To WebhookSee node parameters
Respond to WebhookWeb / APIRespond To WebhookSee node parameters
Get Scalway MachinesWeb / APIHTTP RequestPOST
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
Respond to Webhook4Web / APIRespond To WebhookSee node parameters
Get scw instance by zoneWeb / APIHTTP RequestSee node parameters
Loop Over Zone InstanceRoutingLoop Over ItemsSee node parameters
Get scw baremetal by zoneWeb / APIHTTP RequestSee node parameters
Split Out ZONE_INSTANCETransformSplit OutSee node parameters
If ZONE_BAREMETAL in ZONE_INSTANCERoutingIfSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • httpBasicAuth

Workflow notes

Technical Documentation

Technical Documentation

Description

This n8n workflow retrieves information about Scaleway servers—both instances and baremetal—from dynamically defined zones. It collects server details from the Scaleway API, aggregates them into a single dataset, and allows filtering of the results based on user-defined criteria (such as name, tags, public IP address, or zone) before returning the data via a webhook.

Operation

1. Workflow Trigger

  • Webhook Activation: The workflow is triggered by a Webhook node that listens for an HTTP POST request. This request uses basic authentication (basicAuth) and includes the search parameters:
    • search_by: The filter type (e.g., "tags", "name", "public_ip", or "zone").
    • search: The keyword to filter the server data.

2. Retrieving Server Information

  • HTTP Requests to Scaleway API: The workflow makes HTTP GET requests to two main Scaleway API endpoints:
    • Instances Endpoint: Retrieves server instances from zones specified under the ZONE_INSTANCE variable.
    • Baremetal Endpoint: Retrieves baremetal server information from zones defined in the ZONE_BAREMETAL variable.
    • Headers and Authentication: Each request sends the X-Auth-Token header along with a Content-Type: application/json header and expects a JSON response from the API.

3. Data Processing

  • Zone Splitting and Iteration:
    • A Split Out ZONE_INSTANCE node divides the list of predefined zones so each zone is processed separately.
    • The Loop Over Zone Instance node iterates over the zones. An If ZONE_BAREMETAL in ZONE_INSTANCE node checks whether the current zone is configured for baremetal servers; if so, it directs the flow to the corresponding baremetal API request, otherwise to the instance request.
    • Aggregating and Structuring Data: The Code node aggregates all responses from each zone. It:
      • Iterates over the incoming items.
      • Uses helper functions (extractServers, getPublicIPs, getUser) to extract and normalize key information (name, tags, public IP, server type, state, zone, user).
      • Consolidates the structured server information into a unified array for further processing.

4. Dynamic Filtering

  • Defining Search Criteria: A Set node captures the incoming search parameters (search_by and search) along with configuration details, such as the Scaleway authentication token and the lists of applicable zones.
    • Routing Based on Filter Type: The Switch node analyzes the value of search_by and routes the aggregated server data to one of four dedicated Code nodes that filter the data according to:
      • tags
      • name
      • public_ip
      • zone
    • Error Handling: If the search_by value does not match any of the valid filters, an error response is generated via a dedicated node that returns a JSON error message listing the available filter options.

5. Response via Webhook

  • Returning the Filtered Data: The filtered server data is sent back to the requester via one of several Respond to Webhook nodes assigned to handle the output from each filter type.
    • Error Response: In cases where no valid search criteria are provided, the workflow sends an error JSON response indicating that the valid filters are: tags, name, public_ip, and zone.

Example Usage

To use the workflow from an application or another workflow, send a POST request to the webhook endpoint with a JSON payload similar to this:

{
  "search_by": "tags",
  "search": "Apiv1"
}

If executed successfully, the workflow will return a JSON array with server objects. Each object includes properties such as:

  • name
  • tags
  • public_ip
  • type
  • state
  • zone
  • user
Usage in an External App or Another Workflow

Usage in an External App or Another Workflow

To integrate this part of the workflow into your application or another workflow:

  1. Send a POST Request: Use the Get Scalway Machines node’s endpoint (displayed under the node) to send a POST request containing the search criteria. For example:

    {
      "search_by": "tags",
      "search": "Apiv1"
    }
    
  2. Process the Results: The Loop Over Items node will iterate over each response item, allowing you to handle multiple servers or records in one run.

  3. Receive the Filtered Data: The returned data (each item representing a server) can then be processed further in your application or workflow, giving you a quick, automated way to retrieve and filter Scaleway server information.

Replace the Scaleway-X-Auth-Token Field

Replace the Scaleway-X-Auth-Token Field

To ensure the workflow functions correctly, you must:

  1. Open the Edit Fields node in your workflow.
  2. Locate the Scaleway-X-Auth-Token field and enter your personal Scaleway token (replacing the default value).
  3. If you do not have a token yet:
    • Log in to your Scaleway console.
    • Create a new API Token by following the Scaleway documentation.
    • Copy the generated token and paste it into the Scaleway-X-Auth-Token field.
Get all scaleway server info copy

Get all scaleway server info copy

Purpose and structure

This folder contains the Get all scaleway server info copy workflow. Its executable nodes use code, httpRequest, if, respondToWebhook, set, splitInBatches, splitOut, switch, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Webhook

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/1946_Splitout_Webhook_Import_Webhook.json MIT; preserve source notices.

More in Automation & utilities