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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| Code | Code | Code | See node parameters |
| Edit Fields | Transform | Edit Fields | See node parameters |
| Switch | Routing | Switch | See node parameters |
| Code search Tags | Code | Code | See node parameters |
| Code search Name | Code | Code | See node parameters |
| Code search public_ip | Code | Code | See node parameters |
| Code search zone | Code | Code | See node parameters |
| Webhook | Trigger | Webhook | See node parameters |
| Respond Error | Web / API | Respond To Webhook | See node parameters |
| Respond to Webhook1 | Web / API | Respond To Webhook | See node parameters |
| Respond to Webhook2 | Web / API | Respond To Webhook | See node parameters |
| Respond to Webhook3 | Web / API | Respond To Webhook | See node parameters |
| Respond to Webhook | Web / API | Respond To Webhook | See node parameters |
| Get Scalway Machines | Web / API | HTTP Request | POST |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| Respond to Webhook4 | Web / API | Respond To Webhook | See node parameters |
| Get scw instance by zone | Web / API | HTTP Request | See node parameters |
| Loop Over Zone Instance | Routing | Loop Over Items | See node parameters |
| Get scw baremetal by zone | Web / API | HTTP Request | See node parameters |
| Split Out ZONE_INSTANCE | Transform | Split Out | See node parameters |
| If ZONE_BAREMETAL in ZONE_INSTANCE | Routing | If | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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_INSTANCEvariable. - Baremetal Endpoint: Retrieves baremetal server information from zones defined in the
ZONE_BAREMETALvariable. - Headers and Authentication:
Each request sends the
X-Auth-Tokenheader along with aContent-Type: application/jsonheader and expects a JSON response from the API.
- Instances Endpoint: Retrieves server instances from zones specified under the
3. Data Processing
- Zone Splitting and Iteration:
- A
Split Out ZONE_INSTANCEnode divides the list of predefined zones so each zone is processed separately. - The
Loop Over Zone Instancenode iterates over the zones. AnIf ZONE_BAREMETAL in ZONE_INSTANCEnode 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
Codenode 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.
- A
4. Dynamic Filtering
- Defining Search Criteria:
A
Setnode captures the incoming search parameters (search_byandsearch) along with configuration details, such as the Scaleway authentication token and the lists of applicable zones.- Routing Based on Filter Type:
The
Switchnode analyzes the value ofsearch_byand routes the aggregated server data to one of four dedicatedCodenodes that filter the data according to:tagsnamepublic_ipzone
- Error Handling:
If the
search_byvalue 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.
- Routing Based on Filter Type:
The
5. Response via Webhook
- Returning the Filtered Data:
The filtered server data is sent back to the requester via one of several
Respond to Webhooknodes 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, andzone.
- Error Response:
In cases where no valid search criteria are provided, the workflow sends an error JSON response indicating that the valid filters are:
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:
nametagspublic_iptypestatezoneuser
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:
-
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" } -
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.
-
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:
- Open the Edit Fields node in your workflow.
- Locate the Scaleway-X-Auth-Token field and enter your personal Scaleway token (replacing the default value).
- 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.