diff --git a/__init__.py b/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/__pycache__/__init__.cpython-310.pyc b/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..44df40220e6d47f62b93fcb297f1b3ebe46ef011
Binary files /dev/null and b/__pycache__/__init__.cpython-310.pyc differ
diff --git a/__pycache__/config.cpython-310.pyc b/__pycache__/config.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..89f86a3be7f575f426db597c83e1ee380c036e7a
Binary files /dev/null and b/__pycache__/config.cpython-310.pyc differ
diff --git a/__pycache__/process_data.cpython-310.pyc b/__pycache__/process_data.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a3c6b5ea023cd1de63ed081aa210f6a00ee9472c
Binary files /dev/null and b/__pycache__/process_data.cpython-310.pyc differ
diff --git a/__pycache__/test_process_data.cpython-310-pytest-8.3.5.pyc b/__pycache__/test_process_data.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7d0e17374174aef97fa0e0810d72c3318cd2458c
Binary files /dev/null and b/__pycache__/test_process_data.cpython-310-pytest-8.3.5.pyc differ
diff --git a/config.json b/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..6861120b351047e5b39907dc88f605e38ce26843
--- /dev/null
+++ b/config.json
@@ -0,0 +1,29 @@
+{
+  "API_URL": "https://step-fastapi-email-pro-qa-1054173481485.asia-south1.run.app/evaluate_email",
+  "INPUT_EXCEL_FILE": "/home/user/Documents/Hindu/ReadtowriteExcel/data/HinduInput1.xlsx",
+  "OUTPUT_EXCEL_FILE": "data/evldec17.xlsx",
+
+  "OUTPUT_HEADERS": [
+    "Cefr Level",
+    "Scenario",
+    "Scenario Question",
+    "Subject",
+    "Email Content"
+  ],
+
+  "FORMATTED_RESPONSES_COUNT": 1,
+
+  "PAYLOAD_FIELDS_STATIC": {
+    "user_id": 7600001,
+    "question_id": 100456,
+    "answer_id": 120000789
+  },
+
+  "INPUT_FIELDS_DYNAMIC": {
+    "Cefr Level": "cefr_level",
+    "Scenario": "scenario",
+    "Scenario Question": "scenario_question",
+    "Subject": "subject",
+    "Email Content": "email_content"
+  }
+}
diff --git a/config.py b/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..c41a51f1ff9d1c59e56c75a1f4b6b748dff26d05
--- /dev/null
+++ b/config.py
@@ -0,0 +1,31 @@
+# # config.py
+#
+# API_URL = "https://step-fastapi-email-pro-qa-1054173481485.asia-south1.run.app/evaluate_email"
+# INPUT_EXCEL_FILE = "data/Jan16_1.xlsx"
+# OUTPUT_EXCEL_FILE = "data/evldec17.xlsx"
+# #Headers means out headers to display in excel sheet
+# HEADERS = [
+#     "Cefr Level",
+#     "Scenario",
+#     "Scenario Question",
+#     "Subject",
+#     "Email Content"
+# ]
+#
+# # Response configuration
+# FORMATTED_RESPONSES_COUNT = 3
+
+import json
+
+# Load configuration from JSON
+with open("config.json", "r") as config_file:
+    CONFIG = json.load(config_file)
+
+# Extract values dynamically
+API_URL = CONFIG["API_URL"]
+INPUT_EXCEL_FILE = CONFIG["INPUT_EXCEL_FILE"]
+OUTPUT_EXCEL_FILE = CONFIG["OUTPUT_EXCEL_FILE"]
+OUTPUT_HEADERS = CONFIG["OUTPUT_HEADERS"]
+FORMATTED_RESPONSES_COUNT = CONFIG["FORMATTED_RESPONSES_COUNT"]
+PAYLOAD_FIELDS_STATIC = CONFIG["PAYLOAD_FIELDS_STATIC"]  # Static fields (user_id, question_id, etc.)
+INPUT_FIELDS_DYNAMIC = CONFIG["INPUT_FIELDS_DYNAMIC"]  # Mapping for dynamic unpacking
diff --git a/data/HinduInput.xlsx b/data/HinduInput.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..e0a142fb1b268bf7ffb9bb91d9f2b65ef1b4d9ca
Binary files /dev/null and b/data/HinduInput.xlsx differ
diff --git a/data/HinduInput1.xlsx b/data/HinduInput1.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..e9df0b042a5f525634084a3d79209c91d1adbe31
Binary files /dev/null and b/data/HinduInput1.xlsx differ
diff --git a/data/Jan16.xlsx b/data/Jan16.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..b8d7521ff0b49fbdc79b833ee365e8117c03f012
Binary files /dev/null and b/data/Jan16.xlsx differ
diff --git a/data/Jan16_1.xlsx b/data/Jan16_1.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..e3b3c060ee4e368a8d5413ddfb8bdabd76ff8b43
Binary files /dev/null and b/data/Jan16_1.xlsx differ
diff --git a/data/evldec17.xlsx b/data/evldec17.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..5f85c34eeb6d2322cb6be0cc9cfca1e94c80b1a8
Binary files /dev/null and b/data/evldec17.xlsx differ
diff --git a/data/speak2.xlsx b/data/speak2.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..950c2b1d8a78ac56a096ae4a390da1346cd96ea6
Binary files /dev/null and b/data/speak2.xlsx differ
diff --git a/main.py b/main.py
new file mode 100644
index 0000000000000000000000000000000000000000..5824937d0af29bcac25372c6b8253faf2589c230
--- /dev/null
+++ b/main.py
@@ -0,0 +1,7 @@
+# main.py
+from process_data import process_rows
+
+if __name__ == "__main__":
+    print("Starting the data processing...")
+    process_rows()
+    print("Processing completed!")
diff --git a/process_data.py b/process_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee1366c35dc545796c30b3a84f76d9cc57d536c9
--- /dev/null
+++ b/process_data.py
@@ -0,0 +1,87 @@
+# process_data.py
+
+import time
+from config import API_URL, INPUT_EXCEL_FILE, OUTPUT_EXCEL_FILE, OUTPUT_HEADERS, FORMATTED_RESPONSES_COUNT
+from utils import load_excel, save_excel, create_output_workbook
+from utils.unpack_data import unpack_input_data  # Import the new unpack function
+from utils.api_client import send_api_request
+#pands data format
+
+
+def process_rows():
+    # Load input workbook
+    workbook = load_excel(INPUT_EXCEL_FILE)
+    sheet = workbook.active
+
+    # Generate dynamic output headers
+    output_headers = OUTPUT_HEADERS + [
+        f"Formatted Response{i + 1}" for i in range(FORMATTED_RESPONSES_COUNT)
+    ] + [
+        f"Response Time{i + 1} (seconds)" for i in range(FORMATTED_RESPONSES_COUNT)
+    ]
+
+    # Create output workbook
+    output_workbook = create_output_workbook(output_headers)
+    output_sheet = output_workbook.active
+
+    for row_index, row in enumerate(sheet.iter_rows(min_row=2, values_only=True), start=2):
+        if all(cell is None for cell in row):
+            print(f"Skipping empty row {row_index}")
+            continue
+
+        # Map input columns to header keys dynamically
+        input_data = {header: row[i] for i, header in enumerate(OUTPUT_HEADERS)}
+
+        # Check if all required fields are present
+        if any(value is None for value in input_data.values()):
+            print(f"Skipping row {row_index}: Missing required data")
+            continue
+
+        print(f"Processing row {row_index}")
+
+        # Unpack input data and prepare the payload
+        payload = unpack_input_data(input_data)
+
+        responses = []
+        response_times = []
+
+        for _ in range(FORMATTED_RESPONSES_COUNT):
+            try:
+                response, response_time = send_api_request(API_URL, payload)
+
+                # Check if the response is an actual response object and contains status_code
+                if isinstance(response, dict):  # The response is likely the JSON data
+                    formatted_response = "Response:\n"
+                    for key, value in response.items():
+                        if isinstance(value, str) and "\n" in value:
+                            formatted_response += f"{key.capitalize()}:\n{value.strip()}\n"
+                        else:
+                            formatted_response += f"{key.capitalize()}: {value}\n"
+                    formatted_response += "-" * 50
+                    responses.append(formatted_response)
+                else:
+                    # If the response doesn't contain JSON, handle error (may need to add a check here)
+                    error_response = f"Error: Invalid response format received\n"
+                    responses.append(error_response)
+
+                response_times.append(response_time)
+            except Exception as e:
+                # Handle unexpected exceptions
+                error_message = f"Exception occurred: {str(e)}"
+                responses.append(error_message)
+                response_times.append(0)
+
+            time.sleep(1)
+
+        # Append data to the output sheet
+        output_row = list(input_data.values()) + [
+            responses[i] if i < len(responses) else "N/A" for i in range(FORMATTED_RESPONSES_COUNT)
+        ] + [
+            response_times[i] if i < len(response_times) else 0 for i in range(FORMATTED_RESPONSES_COUNT)
+        ]
+
+        output_sheet.append(output_row)
+
+    # Save the output workbook
+    save_excel(output_workbook, OUTPUT_EXCEL_FILE)
+    print(f"Responses saved in {OUTPUT_EXCEL_FILE}")
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000000000000000000000000000000000000..03f586d41650da9718d8c6bdc6ada4a068cb96a8
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,2 @@
+[pytest]
+pythonpath = .
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f376ed8e27ebbf866d9666dc9a5e64018d7d276e
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+openpyxl
+requests
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000000000000000000000000000000000000..da772baf8897684d4384d0c4f0390a3c08aa9862
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,11 @@
+# Required metadata
+sonar.projectKey=my-project-key
+sonar.projectName=My Python Project
+sonar.projectVersion=1.0
+
+# Path to source directories
+sonar.sources=.
+
+# Language-specific configuration
+sonar.language=py
+sonar.sourceEncoding=UTF-8
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/tests/__pycache__/__init__.cpython-310.pyc b/tests/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1964e52297c51b701839ab20ec864b3bd5b221a1
Binary files /dev/null and b/tests/__pycache__/__init__.cpython-310.pyc differ
diff --git a/tests/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc b/tests/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..36526a09f50af7813b17a2e4c48c112c3267d9eb
Binary files /dev/null and b/tests/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc differ
diff --git a/tests/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc b/tests/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7b9cb75a4d4fa43460d59804d22240654c475aac
Binary files /dev/null and b/tests/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc differ
diff --git a/tests/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc b/tests/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b8e2430f2a0d2ed7bddb726c78e5bcfba017e44a
Binary files /dev/null and b/tests/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc differ
diff --git a/tests/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc b/tests/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..abe196ebf00ba77038141ba18c850e83909aba3b
Binary files /dev/null and b/tests/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc differ
diff --git a/tests/test_api_client.py b/tests/test_api_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..330664137077d223587d32df236ac387b7e33d90
--- /dev/null
+++ b/tests/test_api_client.py
@@ -0,0 +1,44 @@
+import os
+import pytest
+import requests
+from unittest.mock import patch
+from utils.api_client import send_api_request
+
+@patch("requests.post")
+@patch("time.time")
+def test_send_api_request_success(mock_time, mock_post):
+    # Mock API response
+    mock_response = mock_post.return_value
+    mock_response.json.return_value = {"status": "success", "data": "Sample data"}
+
+    # Mock timing for response calculation
+    mock_time.side_effect = [1000, 1002]  # Start and end time (2 seconds response time)
+
+    url = "https://step-fastapi-email-pro-qa-1054173481485.asia-south1.run.app/evaluate_email"
+    payload = {
+        "user_id": 7600001,
+        "question_id": 100456,
+        "answer_id": 120000789,
+        "cefr_level": "C1",
+        "subject": "Subject: Project Feedback",
+        "scenario": "addressing issue or giving feedback",
+        "scenario_question": "You are a team leader in a company, and one of your team members recently completed an important project. You need to provide feedback on their work, talking about both the positives and the areas for improvement. The goal is to note their hard work, encourage them, and give guidance for future projects.",
+        "email_content": "Hi Emma, I wanted to say a big thank you for all your hard work on the Marketing Campaign Launch project. It was a big project, and you did a great job!..."
+    }
+
+    response_data, response_time = send_api_request(url, payload)
+
+    assert response_data == {"status": "success", "data": "Sample data"}
+    assert response_time == 2
+
+@patch("requests.post")
+def test_send_api_request_error(mock_post):
+    # Simulate request failure
+    mock_post.side_effect = requests.exceptions.RequestException("API Failure")
+
+    url = "https://step-fastapi-email-pro-qa-1054173481485.asia-south1.run.app/evaluate_email"
+    payload = {}
+    response_data, response_time = send_api_request(url, payload)
+
+    assert response_data == {}
+    assert response_time == 0
diff --git a/tests/test_excel_operation.py b/tests/test_excel_operation.py
new file mode 100644
index 0000000000000000000000000000000000000000..76759dbb4493af14ef835c8c1f8d0d4c488af5a9
--- /dev/null
+++ b/tests/test_excel_operation.py
@@ -0,0 +1,49 @@
+import pytest
+import openpyxl
+from utils.excel_operations import load_excel, save_excel, create_output_workbook
+import os
+
+@pytest.fixture
+def sample_workbook(tmp_path):
+    """Create a sample workbook for testing."""
+    file_path = tmp_path / "test.xlsx"
+    workbook = openpyxl.Workbook()
+    sheet = workbook.active
+    sheet.append(["Name", "Age", "City"])
+    sheet.append(["John Doe", 30, "New York"])
+    workbook.save(file_path)
+    return file_path
+
+def test_load_excel(sample_workbook):
+    """Test loading an existing Excel file."""
+    workbook = load_excel(sample_workbook)
+    sheet = workbook.active
+
+    assert sheet.cell(row=1, column=1).value == "Name"
+    assert sheet.cell(row=2, column=1).value == "John Doe"
+
+def test_save_excel(tmp_path):
+    """Test saving an Excel file."""
+    workbook = openpyxl.Workbook()
+    sheet = workbook.active
+    sheet.append(["Product", "Price"])
+    sheet.append(["Laptop", 1200])
+
+    file_path = tmp_path / "output.xlsx"
+    save_excel(workbook, file_path)
+
+    # Verify the file is created and data is saved correctly
+    loaded_workbook = openpyxl.load_workbook(file_path)
+    loaded_sheet = loaded_workbook.active
+
+    assert loaded_sheet.cell(row=1, column=1).value == "Product"
+    assert loaded_sheet.cell(row=2, column=2).value == 1200
+
+def test_create_output_workbook():
+    """Test creating a new workbook with headers."""
+    headers = ["ID", "Name", "Department"]
+    workbook = create_output_workbook(headers)
+    sheet = workbook.active
+
+    assert sheet.cell(row=1, column=1).value == "ID"
+    assert sheet.cell(row=1, column=3).value == "Department"
diff --git a/tests/test_payload_mapping.py b/tests/test_payload_mapping.py
new file mode 100644
index 0000000000000000000000000000000000000000..3647c4980da51aca0a0fc20c9510dac40c1e6167
--- /dev/null
+++ b/tests/test_payload_mapping.py
@@ -0,0 +1,53 @@
+import pytest
+from utils.payload_mapping import get_payload_mapping
+from config import PAYLOAD_FIELDS_STATIC
+
+
+def test_get_payload_mapping_complete_data():
+    input_data = {
+        "cefr_level": "c1",
+        "scenario": "addressing issue or giving feedback",
+        "scenario_question": "You are a team leader providing project feedback.",
+        "subject": "Subject: Project Feedback",
+        "email_content": "Hi Emma, great work on the project!"
+    }
+
+    expected_payload = PAYLOAD_FIELDS_STATIC.copy()
+    expected_payload.update(input_data)
+
+    assert get_payload_mapping(input_data) == expected_payload
+
+
+def test_get_payload_mapping_partial_data():
+    input_data = {
+        "cefr_level": "b1",
+        "email_content": "Reminder: Please submit your report."
+    }
+
+    expected_payload = PAYLOAD_FIELDS_STATIC.copy()
+    expected_payload.update(input_data)
+
+    assert get_payload_mapping(input_data) == expected_payload
+
+
+def test_get_payload_mapping_empty_data():
+    input_data = {}
+
+    expected_payload = PAYLOAD_FIELDS_STATIC.copy()
+
+    assert get_payload_mapping(input_data) == expected_payload
+
+
+def test_get_payload_mapping_overwrite_static_fields():
+    input_data = {
+        "user_id": 7600001,  # Attempt to overwrite static field
+        "email_content": "Custom content for testing."
+    }
+
+    expected_payload = PAYLOAD_FIELDS_STATIC.copy()
+    expected_payload["email_content"] = "Custom content for testing."
+
+    # Static fields should not change
+    expected_payload["user_id"] = PAYLOAD_FIELDS_STATIC["user_id"]
+
+    assert get_payload_mapping(input_data) == expected_payload
diff --git a/utils/__init__.py b/utils/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e0a55c68876e5e8afda47d30c2e452550e58a25d
--- /dev/null
+++ b/utils/__init__.py
@@ -0,0 +1,2 @@
+# utils/__init__.py
+from .excel_operations import load_excel, save_excel, create_output_workbook
diff --git a/utils/__pycache__/__init__.cpython-310.pyc b/utils/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..231ff3a54ded608ca0d7c36f6b9be25382f43f63
Binary files /dev/null and b/utils/__pycache__/__init__.cpython-310.pyc differ
diff --git a/utils/__pycache__/api_client.cpython-310.pyc b/utils/__pycache__/api_client.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3108cdc02a3096ae411dab7b07bdace4eb16733a
Binary files /dev/null and b/utils/__pycache__/api_client.cpython-310.pyc differ
diff --git a/utils/__pycache__/excel_operations.cpython-310.pyc b/utils/__pycache__/excel_operations.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aee0c5ade75a793ad4e109f3ea75860fe74af5ed
Binary files /dev/null and b/utils/__pycache__/excel_operations.cpython-310.pyc differ
diff --git a/utils/__pycache__/payload_mapping.cpython-310.pyc b/utils/__pycache__/payload_mapping.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1ea7b6d76b6eb27bb775def279c43c93e2548db0
Binary files /dev/null and b/utils/__pycache__/payload_mapping.cpython-310.pyc differ
diff --git a/utils/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc b/utils/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b731e60c28aed7c98b131f10999c9ddddcbc07df
Binary files /dev/null and b/utils/__pycache__/test_api_client.cpython-310-pytest-8.3.5.pyc differ
diff --git a/utils/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc b/utils/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c7e7edb22b4a8c0b2006baeb7df32c4aca28b7a9
Binary files /dev/null and b/utils/__pycache__/test_excel_operation.cpython-310-pytest-8.3.5.pyc differ
diff --git a/utils/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc b/utils/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8037ab1f8e54a6fc3da3b652201f15bbba453ec4
Binary files /dev/null and b/utils/__pycache__/test_payload_mapping.cpython-310-pytest-8.3.5.pyc differ
diff --git a/utils/__pycache__/test_unpack_data.cpython-310-pytest-8.3.5.pyc b/utils/__pycache__/test_unpack_data.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..299a011a22e4dc30f8e83fe59df3f592d7b88dbe
Binary files /dev/null and b/utils/__pycache__/test_unpack_data.cpython-310-pytest-8.3.5.pyc differ
diff --git a/utils/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc b/utils/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4371551a407444531af35da580e629513e93bea3
Binary files /dev/null and b/utils/__pycache__/tests_api_client.cpython-310-pytest-8.3.5.pyc differ
diff --git a/utils/__pycache__/unpack_data.cpython-310.pyc b/utils/__pycache__/unpack_data.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..536a455ec684288462331114e7d4f4c481b62146
Binary files /dev/null and b/utils/__pycache__/unpack_data.cpython-310.pyc differ
diff --git a/utils/api_client.py b/utils/api_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..b0fdf29453fcc31d6f1d1312d09add401bb393a6
--- /dev/null
+++ b/utils/api_client.py
@@ -0,0 +1,18 @@
+# utils/api_client.py
+
+import requests
+import time
+
+def send_api_request(url, payload):
+    try:
+        # Assuming it's a POST request
+        start_time = time.time()
+        response = requests.post(url, json=payload)
+        response_time = time.time() - start_time
+
+        # Assuming response.json() gives us the actual data as a dictionary
+        return response.json(), response_time
+
+    except Exception as e:
+        print(f"API Request Error: {str(e)}")
+        return {}, 0  # Return an empty dict and 0 time on error
diff --git a/utils/excel_operations.py b/utils/excel_operations.py
new file mode 100644
index 0000000000000000000000000000000000000000..86023022c537500f4d39c311abc884cddb5a93ce
--- /dev/null
+++ b/utils/excel_operations.py
@@ -0,0 +1,17 @@
+# utils/excel_operations.py
+import openpyxl
+
+def load_excel(file_path):
+    """Load an Excel file and return the workbook."""
+    return openpyxl.load_workbook(file_path)
+
+def save_excel(workbook, file_path):
+    """Save the workbook to a file."""
+    workbook.save(file_path)
+
+def create_output_workbook(headers_name):
+    """Create a new workbook and add headers."""
+    workbook = openpyxl.Workbook()
+    sheet = workbook.active
+    sheet.append(headers_name)
+    return workbook
diff --git a/utils/payload_mapping.py b/utils/payload_mapping.py
new file mode 100644
index 0000000000000000000000000000000000000000..b8aa874ec97ae1a7e4b4bba61ecb6bd649829d25
--- /dev/null
+++ b/utils/payload_mapping.py
@@ -0,0 +1,46 @@
+# # utils/payload_mapping.py
+#
+# def get_payload_mapping(cefr_level, scenario, scenario_question, subject, email_content):
+#     """
+#     Maps input data to the payload structure required by the API with fixed user_id, question_id, and answer_id.
+#
+#     Args:
+#         cefr_level (str): The CEFR level of the input data.
+#         scenario (str): The scenario description.
+#         scenario_question (str): The scenario question.
+#         subject (str): The subject or topic.
+#         email_content (str): The email content.
+#
+#     Returns:
+#         dict: The payload ready to be sent to the API.
+#     """
+#     return {
+#         "cefr_level": cefr_level,
+#         "user_id": 7600001,  # Static user ID
+#         "question_id": 100456,  # Static question ID
+#         "answer_id": 120000789,  # Static answer ID
+#         "scenario": scenario,
+#         "scenario_question": scenario_question,
+#         "subject": subject,
+#         "email_content": email_content
+#     }
+
+from config import PAYLOAD_FIELDS_STATIC
+
+def get_payload_mapping(input_data):
+    """
+    Maps input data to the payload structure required by the API dynamically.
+
+    Args:
+        input_data (dict): The dictionary containing dynamically unpacked input data.
+
+    Returns:
+        dict: The complete payload ready to be sent to the API.
+    """
+    # Start with manually configured static fields from config.json
+    payload = PAYLOAD_FIELDS_STATIC.copy()  # Ensuring we don't modify the original dictionary
+
+    # Add dynamically unpacked fields
+    payload.update(input_data)
+
+    return payload
diff --git a/utils/unpack_data.py b/utils/unpack_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..48d7df68f2e78bbbf0d8771495bed0525225d628
--- /dev/null
+++ b/utils/unpack_data.py
@@ -0,0 +1,25 @@
+from config import INPUT_FIELDS_DYNAMIC
+from utils.payload_mapping import get_payload_mapping
+
+def unpack_input_data(input_data):
+    """
+    Unpacks input data dynamically using JSON-defined mappings.
+
+    Args:
+        input_data (dict): The dictionary containing raw input data (e.g., from Excel).
+
+    Returns:
+        dict or None: The prepared payload for the API request or None if the row is empty.
+    """
+    unpacked_data = {}
+
+    # Loop through INPUT_FIELDS mapping from config.json to dynamically unpack data
+    for excel_field, payload_key in INPUT_FIELDS_DYNAMIC.items():
+        unpacked_data[payload_key] = input_data.get(excel_field, "").strip()  # Strip whitespace
+
+    # Check if all unpacked values are empty
+    if all(value == "" for value in unpacked_data.values()):
+        return None  # Skip empty rows
+
+    # Pass valid data to get_payload_mapping
+    return get_payload_mapping(unpacked_data)