Description
Overview
This user data collection automation workflow extracts structured user information and appends it to Google Sheets while generating a CSV file for offline use. This no-code integration pipeline targets data engineers and automation specialists seeking a streamlined method to capture and log user details from an external JSON API.
Key Benefits
- Automates extraction of user names and countries from JSON API responses.
- Appends user data directly into a Google Sheets spreadsheet via OAuth2 authentication.
- Simultaneously converts structured data into a CSV file for offline access.
- Maintains data consistency by isolating and reformatting required fields only.
Product Overview
This automation workflow initiates with an HTTP Request node configured to perform a GET request to a public user data API returning JSON-formatted random user information. The JSON response contains nested fields including user name details and geographic location. The workflow’s Set node extracts the first and last names, concatenates them into a single string under the key name, and isolates the user’s country into a country field, producing a simplified dataset. This dataset is forwarded concurrently to two destinations: a Google Sheets node appends the data as a new row within a specified spreadsheet using OAuth2 authentication, and a Spreadsheet File node generates a CSV file named users_spreadsheet.csv. Error handling follows the platform’s default behavior, with no custom retry or backoff logic configured. All processing is synchronous within the execution context, with no data persistence beyond the Google Sheets storage and generated CSV file output.
Features and Outcomes
Core Automation
The core orchestration pipeline accepts JSON user data via an HTTP GET trigger, applies field mapping and transformation in the Set node, and routes output to parallel destinations. This deterministic data flow ensures single-pass evaluation with explicit field extraction.
- Deterministic extraction of user name and country fields from nested JSON.
- Single-pass data transformation with no intermediate storage.
- Parallel output streams to both spreadsheet append and file generation.
Integrations and Intake
This no-code integration workflow connects to a public API endpoint for random user data without authentication and utilizes Google Sheets API with OAuth2 for secure append operations. The input payload is JSON containing nested user data fields, while the Google Sheets node requires a sheet ID and range.
- HTTP Request node retrieves JSON user data from an external API.
- Google Sheets node appends processed data using OAuth2 credentials.
- Spreadsheet File node converts JSON data into CSV format for export.
Outputs and Consumption
The workflow delivers processed data in two output formats: appended rows within a Google Sheets spreadsheet and a synchronous CSV file output. The CSV file contains columns for user name and country, matching the spreadsheet schema.
- Google Sheets append operation outputs data as new rows in range A:C.
- CSV file output named
users_spreadsheet.csvincludes extracted fields. - Synchronous delivery supports immediate downstream consumption or export.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow begins with an HTTP Request node that issues a GET request to a public JSON API supplying random user data. No authentication headers are required for this request.
Step 2: Processing
The JSON response undergoes transformation in the Set node, which extracts the first and last name fields, concatenates them into a single name string, and extracts the user’s country. Basic presence checks ensure these fields exist before forwarding.
Step 3: Analysis
The workflow applies deterministic logic to isolate only the required fields. No additional filtering or conditional branching is configured, ensuring consistent data structure output.
Step 4: Delivery
Processed data is sent concurrently to the Google Sheets node for appending as a new row in the specified spreadsheet and to the Spreadsheet File node for CSV file generation. Both outputs finalize synchronously within the workflow execution.
Use Cases
Scenario 1
Data teams require automated ingestion of user demographics from external APIs for analytics. This workflow fetches, extracts, and logs user names and countries into a Google Sheet, providing a reliable dataset for analysis without manual entry.
Scenario 2
Developers need a no-code integration pipeline to generate CSV files with user data for offline processing. This workflow converts API JSON responses into CSV format with minimal configuration, enabling straightforward data export workflows.
Scenario 3
Operations teams want to maintain a continuously updated user list accessible via Google Sheets. This automation appends new user records from a random data API directly to the spreadsheet, ensuring up-to-date records with no manual intervention.
How to use
After importing the workflow into n8n, configure the Google Sheets node with valid OAuth2 credentials and specify the target spreadsheet ID. No additional setup is required for the HTTP Request node. Execute the workflow manually or schedule triggers to run it regularly. The outputs will include appended rows in Google Sheets and a CSV file named users_spreadsheet.csv containing user name and country data.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual data extraction, transformation, and entry steps | Single automated pipeline with parallel output delivery |
| Consistency | Prone to human error and data formatting inconsistencies | Deterministic field extraction and standardized data formatting |
| Scalability | Limited by manual processing capacity | Scales with API and platform throughput without added maintenance |
| Maintenance | Requires ongoing manual updates and data reconciliation | Minimal maintenance with established OAuth2 credential reuse |
Technical Specifications
| Environment | n8n automation platform |
|---|---|
| Tools / APIs | HTTP Request (public API), Google Sheets API, Spreadsheet File node |
| Execution Model | Synchronous, single-run execution per trigger |
| Input Formats | JSON from HTTP GET API response |
| Output Formats | Google Sheets appended rows, CSV file |
| Data Handling | Transient in-memory processing; no persistent storage except outputs |
| Known Constraints | Relies on availability of external API and Google Sheets service |
| Credentials | OAuth2 for Google Sheets API access |
Implementation Requirements
- Valid OAuth2 credentials configured for Google Sheets node access.
- Network access to public randomuser.me API endpoint.
- Google Sheets spreadsheet with appropriate permissions and sheet ID.
Configuration & Validation
- Verify the HTTP Request node successfully retrieves JSON user data without errors.
- Confirm the Set node correctly extracts and formats
nameandcountryfields. - Test Google Sheets node appends data correctly and CSV file output matches expected structure.
Data Provenance
- HTTP Request node triggers data ingestion from the randomuser.me public API.
- Set node extracts and formats
nameandcountryfields from JSON. - Google Sheets node appends extracted data rows; Spreadsheet File node creates CSV output.
FAQ
How is the user data collection automation workflow triggered?
The workflow starts with an HTTP GET request node that fetches JSON user data from a public API endpoint, initiating the data extraction and processing sequence.
Which tools or models does the orchestration pipeline use?
The workflow uses an HTTP Request node to retrieve data, a Set node for JSON field extraction, a Google Sheets node with OAuth2 authentication to append data, and a Spreadsheet File node to generate CSV output.
What does the response look like for client consumption?
Output data is appended as new rows in Google Sheets with columns for name and country, and simultaneously provided as a CSV file named users_spreadsheet.csv containing the same fields.
Is any data persisted by the workflow?
Data is persisted only in the Google Sheets spreadsheet and the generated CSV file; no intermediate or permanent persistence occurs within the workflow itself.
How are errors handled in this integration flow?
The workflow relies on n8n platform default error handling without custom retry or backoff logic configured for nodes.
Conclusion
This user data collection automation workflow provides a deterministic and repeatable process to extract, transform, and store user names and countries from an external API into Google Sheets and CSV files. It supports secure OAuth2 authentication for data appending and synchronous file generation. The workflow’s dependency on external API availability and Google Sheets service constitutes a key operational constraint. Overall, it enables consistent data capture with minimal manual steps, suitable for integration into broader data ingestion pipelines or reporting systems.








Reviews
There are no reviews yet.