Day 1 — Setup and Data Ingestion_updated
Day 1 — Setup and Data Ingestion_updated
This commit is contained in:
@@ -1,57 +1,56 @@
|
|||||||
# 📅 Day 1 — Setup and Data Ingestion
|
# 📅 Day 1 — Setup and Data Ingestion
|
||||||
|
|
||||||
## 🎯 Goal
|
## 🎯 Goal
|
||||||
Establish the foundation for the project.
|
Establish the foundation of the project.
|
||||||
The primary objective is to create an **n8n workflow** that successfully fetches raw **sales** and **product review data** from their respective sources.
|
Create an **n8n workflow** that successfully fetches raw sales and product review data from their respective sources.
|
||||||
|
|
||||||
----
|
---
|
||||||
|
|
||||||
## 🧩 Tasks
|
## 🧩 Tasks
|
||||||
|
|
||||||
### 1. Environment Setup
|
### 1. Environment Setup
|
||||||
- Set up your **n8n instance**:
|
- Get your **n8n instance** running (n8n Cloud, Docker, or local install).
|
||||||
- Options: n8n Cloud, Docker, or local installation.
|
- Set up a **Python environment**:
|
||||||
- Reference: [https://docs.n8n.io/hosting/](https://docs.n8n.io/hosting/)
|
|
||||||
- Create a **Python environment**.
|
|
||||||
- Install necessary libraries:
|
|
||||||
```bash
|
```bash
|
||||||
pip install pandas nltk
|
pip install pandas nltk
|
||||||
```
|
2. Create a New n8n Workflow
|
||||||
|
Start with a Manual Trigger node (Start).
|
||||||
|
|
||||||
---
|
This will be replaced with an automated schedule on Day 5.
|
||||||
|
|
||||||
### 2. Create a New n8n Workflow
|
3. Fetch Sales Data
|
||||||
- Start with a **Manual Trigger** node (`Start`).
|
Add an HTTP Request node (or Database node like PostgreSQL).
|
||||||
- This will later be replaced with an automated schedule on **Day 5**.
|
|
||||||
|
|
||||||
---
|
Connect to your e-commerce platform’s API (e.g., Shopify /orders.json).
|
||||||
|
|
||||||
### 3. Fetch Sales Data
|
Set up authentication (API Key, OAuth2, etc.).
|
||||||
- Add an **HTTP Request** or **Database Node (PostgreSQL/MySQL)**.
|
|
||||||
- Connect to your e-commerce API endpoint (e.g., Shopify → `/orders.json`).
|
|
||||||
- Set up credentials (API Key, OAuth2, etc.).
|
|
||||||
- Test and verify that recent order data (e.g., order_id, product_id, price, quantity) is fetched successfully.
|
|
||||||
|
|
||||||
---
|
Test the node to ensure it pulls recent orders.
|
||||||
|
|
||||||
### 4. Fetch Product Reviews
|
4. Fetch Product Reviews
|
||||||
- Add another **HTTP Request** node.
|
Add another HTTP Request node.
|
||||||
- Configure it to pull recent **product reviews** (e.g., review_text, rating).
|
|
||||||
- Test independently to ensure successful data retrieval.
|
|
||||||
|
|
||||||
---
|
Connect to your website API or third-party service to fetch reviews.
|
||||||
|
|
||||||
### 5. Combine Data Streams
|
Test independently to ensure data retrieval.
|
||||||
- Add a **Merge Node**.
|
|
||||||
- Connect both sales and review nodes.
|
|
||||||
- Set **Mode** → `Combine`.
|
|
||||||
- This ensures both data sets are merged and available for the next phase.
|
|
||||||
|
|
||||||
---
|
5. Combine Data Streams
|
||||||
|
Add a Merge node.
|
||||||
|
|
||||||
## ✅ Deliverable
|
Connect Sales Data and Review Data nodes.
|
||||||
A manually triggered **n8n workflow** that:
|
|
||||||
- Pulls raw data from **two sources** (sales + reviews).
|
|
||||||
- Combines them using a **Merge node**.
|
|
||||||
- Outputs unified JSON data ready for analysis.
|
|
||||||
|
|
||||||
|
Set Mode → Combine.
|
||||||
|
|
||||||
|
This ensures both data sets are available for the next step.
|
||||||
|
|
||||||
|
✅ Deliverable
|
||||||
|
A manually triggered n8n workflow that:
|
||||||
|
|
||||||
|
Pulls raw data from two sources (sales + reviews).
|
||||||
|
|
||||||
|
Merges the data into a single workflow run.
|
||||||
|
|
||||||
|
💡 Solution
|
||||||
|
Workflow successfully merges sales and review data.
|
||||||
|
|
||||||
|
Outputs a combined JSON object, ready for Day 2 Python processing.
|
||||||
Reference in New Issue
Block a user