The Scenario
You are a SaaS product manager. Your trial-to-paid conversion campaign just closed and you have 400 new paying customers in an Excel workbook — name in column A, email in column B, phone in column C.
Before the subscriptions team can set up recurring billing in Razorpay, every one of them needs to exist as a Razorpay customer record. You need to call the Razorpay customer creation API 400 times and write the resulting customer_id back to column D.
The slow version:
- Write a Python script to loop through the Excel sheet via openpyxl
- Handle Razorpay authentication, rate limits, and error responses
- Export the workbook to CSV, run the script, get an error on row 47 — dashes in the phone number
- Fix the script, re-run from row 47, realize you're about to create duplicates for rows 1-46
- The subscriptions team has been waiting half a day.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that can call the Razorpay API per row and write the results back, without a script.
Open the SheetXAI sidebar and type:
For each row in this workbook, create a Razorpay customer using the name in column A, email in column B, and phone in column C. Write the resulting customer_id to column D. If a customer already exists with that email, write the existing customer ID instead. Log any other error in column E.
SheetXAI iterates through all 400 rows, calls the Razorpay customer creation endpoint for each one, handles deduplication by email, and writes results back row by row.
What You Get
A workbook with all 400 rows updated:
- Column D — the Razorpay
customer_idfor each row - Column E — any error message for rows that failed, blank if it succeeded
- Deduplication handled — existing customers get their existing ID, not a duplicate record
The subscriptions team can start immediately. No handoff, no second export.
What If the Data Is Not Quite Ready
When phone numbers have inconsistent formatting
Some rows have +91-XXXXX-XXXXX, some have 91XXXXXXXXXX, some just ten digits.
Normalize all phone numbers in column C to E.164 format before creating the Razorpay customers. If a number cannot be normalized to a valid Indian mobile number, skip that row and write "Invalid phone" in column E. Then create customers for all valid rows.
When some rows are missing email addresses
Create Razorpay customers for all rows where column B has a valid email address. For rows where column B is empty, skip customer creation and write "Missing email" in column E. Log all created customer IDs in column D.
When 60 rows already have customer IDs from a previous partial run
For each row in this workbook, check if column D already has a customer_id. If it does, skip that row. If column D is empty, create a Razorpay customer using name, email, and phone from columns A, B, and C, and write the new customer_id to column D. Log errors in column E.
When you want to verify the created customers by fetching them back
After creating the Razorpay customer for each row, immediately fetch the record using the returned customer_id and verify the email matches column B. If there is a mismatch, write "Verify" in column F.
The pattern: the prompt handles the conditional logic row by row. No pre-filtering needed.
Try It
Get the 7-day free trial of SheetXAI and open your new customer workbook, then ask it to create the Razorpay records and write the IDs back. The Razorpay integration is included in every SheetXAI plan. For related workflows, see how to generate payment links in bulk in Excel or the Razorpay in Excel overview.
