how to automate file delivery via WhatsApp using n8n and Razorpay
By Catalina Jaramillo · AI Commerce & Revenue Operations Consultant · 2026-10-26
You can link Razorpay’s payment webhook to an n8n workflow that calls the WhatsApp Business API and delivers a file URL as soon as the transaction is confirmed. The whole process runs in minutes and requires no custom code.
What tools and accounts are required?
The automation relies on three core services: Razorpay for payment processing, n8n as the orchestration engine, and a WhatsApp Business API provider (e.g., Twilio, 360dialog, or MessageBird). Each service offers a free tier or trial that is sufficient for a pilot.
Having a cloud‑hosted n8n instance (Docker, Railway, or n8n.cloud) ensures reliable execution of webhooks and scheduled tasks.
- Razorpay merchant account – enable Webhook URL generation.
- WhatsApp Business API account – obtain API key and phone number.
- n8n instance – public URL (HTTPS) to receive Razorpay callbacks.
- File storage – cloud bucket (Google Drive, AWS S3) with shareable link.
How do you configure Razorpay to trigger n8n?
Razorpay can send a POST request to any HTTPS endpoint when a payment event occurs. In the Razorpay dashboard, create a webhook that points to your n8n webhook node and select the "payment.captured" event.
The payload includes order_id, amount, and customer email, which you will use later to personalize the WhatsApp message.
- In Razorpay → Settings → Webhooks → Add New Webhook.
- URL: https://your-n8n-instance.com/webhook/razorpay‑capture
- Events: payment.captured
- Enable signature verification and copy the secret for n8n validation.
Carolina, Catalina's AI agent, reviews your business, shows which system solves it and what it would cost. If there is a fit, she books a call with Catalina.
Tell Carolina about your case →How to set up the WhatsApp message node in n8n?
After the Razorpay webhook node, add a HTTP Request node that calls the WhatsApp provider’s "messages" endpoint. Map the customer’s phone number and the file URL into the JSON body.
If you use Twilio, the endpoint is https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json; for 360dialog it is https://waba.360dialog.io/v1/messages.
- Add a Set node to format the message: "Thank you for your purchase! Here is your file: {file_link}".
- Configure authentication (Bearer token or Basic Auth) using the provider’s credentials.
- Include a fallback text for users whose WhatsApp client cannot render the link.
- Test the request with a sandbox number before going live.
How to store and retrieve the file securely?
Store the digital product in a cloud bucket with restricted access. Generate a signed, time‑limited URL (e.g., 24‑hour expiry) each time a payment is confirmed, then embed that URL in the WhatsApp message.
This approach prevents unauthorized sharing while keeping the user experience seamless.
- Upload the file to Google Drive → Share → Get shareable link → Set expiration.
- Or use AWS S3 pre‑signed URL: aws s3 presign s3://bucket/file.pdf --expires-in 86400.
- Add a Function node in n8n to call the cloud SDK and return the signed link.
- Log the link generation in a spreadsheet or simple DB for audit.
How to test, monitor, and measure the workflow?
Run a few test transactions in Razorpay’s sandbox mode. Verify that the webhook reaches n8n, the signed URL is created, and the WhatsApp message arrives with the correct file link.
n8n provides execution logs and error handling; set up an error workflow that notifies you via email if any step fails.
- Enable "Retry on Failure" in n8n for the HTTP Request node.
- Create a separate Slack or email node for error alerts.
- Track conversion: count successful file downloads vs. payments captured.
- After a pilot, consider a monthly monitoring package – Catalina’s Optimisation and growth continuous service starts at USD 1,000 / month.
How would Catalina design this solution for a startup?
Catalina begins with a strategic diagnostic (USD 490) to map the startup’s sales funnel, payment volume, and compliance needs. She then sketches a lightweight n8n workflow that covers payment capture, file hosting, and WhatsApp delivery, and runs a 2‑week pilot with clear KPIs (delivery latency, error rate, customer satisfaction).
After the pilot, Catalina configures the production‑ready workflow, adds monitoring dashboards, and offers a maintenance retainer – either the Revenue Agent Sprint (USD 2,500 + USD 750 / month) or the Optimisation package (USD 1,000 – 2,000 / month) depending on the scope.
- Diagnostic session – understand order types and file sizes.
- Design phase – prototype in n8n, use existing WhatsApp provider credentials.
- Pilot – limited number of real payments, collect feedback.
- Roll‑out – configure production webhook, secure storage, and SLA monitoring.
- Investment range for the full automation: USD 500 – 1,500 for an Express setup, plus monthly support from USD 750 onward.
FAQ
Do I need a developer to build the n8n workflow?
No. n8n’s visual editor lets you drag‑and‑drop nodes and map fields without writing code. Basic familiarity with APIs and JSON is enough.
Can I use a free WhatsApp API provider?
Most providers charge per message, but they offer a free trial with a limited number of messages, which is ideal for a pilot.
What happens if a payment fails after the webhook fires?
Configure the Razorpay webhook to listen only to the "payment.captured" event; failed or pending payments will not trigger the workflow.
Is the file link safe from sharing?
By generating a time‑limited signed URL you limit exposure. After expiration the link becomes invalid, reducing the risk of unauthorized distribution.
How much does the entire automation cost?
A basic Express automation can be built for USD 500 – 1,500 plus a monthly support fee (USD 750 – 1,200) depending on the chosen WhatsApp provider and storage option.
Carolina, Catalina's AI agent, reviews your business, shows which system solves it and what it would cost. If there is a fit, she books a call with Catalina.
Tell Carolina about your case →