graph TD
A[Start] --> B[Receive Input Variables]
B --> C[Extract business_name]
B --> D[Extract services list]
B --> E[Extract service_area list]
B --> F[Extract website_url]
D --> G[Process Services]
G --> G1[Split by comma]
G1 --> G2[Trim whitespace]
G2 --> G3[Convert to lowercase]
G3 --> G4[Deduplicate]
E --> H[Process Service Areas]
H --> H1[Split by comma]
H1 --> H2[Trim whitespace]
H2 --> H3[Convert to lowercase]
H3 --> H4[Deduplicate]
F --> I[Process Website]
I --> I1{Is URL blank?}
I1 -->|Yes| I2[Set as null]
I1 -->|No| I3[Keep URL]
C --> J[Construct JSON]
G4 --> J
H4 --> J
I2 --> J
I3 --> J
J --> K[Write to File]
K --> L[Save as business_profile.json]
L --> M[End]