Automate User Data Sync: From API to Spreadsheet and Email
detail.loadingPreview
Streamline your data management by automatically fetching random user data from an API, organizing it into spreadsheets, and distributing it via email. This workflow ensures your data is always up-to-date and accessible.
About This Workflow
This n8n workflow automates the process of collecting user data and distributing it efficiently. It begins by fetching random user information from the randomuser.me API. The retrieved data is then processed and structured, first by extracting relevant details like name and country using a 'Set' node. This structured data is then pushed to a Google Sheet for easy tabular analysis. Concurrently, the raw data is converted into a CSV file and then a JSON file, which is subsequently saved. Finally, this JSON file is attached and sent via Gmail, ensuring a comprehensive data distribution strategy. The workflow also includes notes to clarify key transformation steps like JSON to Google Sheets and JSON to CSV.
Key Features
- API Data Fetching: Automatically retrieves diverse user data from external APIs.
- Data Transformation: Cleans and structures raw data for usability.
- Multi-Platform Output: Exports data to Google Sheets and file formats (CSV, JSON).
- Automated Distribution: Sends generated files via email using Gmail integration.
- Error Handling & Clarity: Includes notes for better workflow understanding.
How To Use
- Configure HTTP Request Node: Set the
URLtohttps://randomuser.me/api/to fetch user data. - Set Node Configuration: Use the 'Set' node to extract specific fields like 'name' (first and last) and 'country' from the API response.
- Google Sheets Integration: Connect your Google Sheets account via OAuth2 and configure the 'Google Sheets' node to 'append' data to your desired sheet (
sheetId: "qwertz",range: "A:C"). - CSV Export: Use the 'Spreadsheet File' node to convert the data to CSV format with a file name like
users_spreadsheet. - JSON File Generation: Utilize 'Spreadsheet File1' and 'Move Binary Data1' to convert the data to JSON and then to binary format.
- Write Binary File: Configure 'Write Binary File' to save the JSON data as
randomusers.json. - Gmail Integration: Connect your Gmail account and set up the 'Gmail1' node to send the generated JSON file as an attachment. Customize the subject and message content.
- Final Google Sheets Append: Use the second 'Google Sheets2' node to append the data derived from the JSON file attachment to your Google Sheet.
Apps Used
Workflow JSON
{
"id": "3c1a9757-ce57-4a39-8caf-f154556d921b",
"name": "Automate User Data Sync: From API to Spreadsheet and Email",
"nodes": 15,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 3c1a9757-ce57...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.