Skip to content
RPA & Workflows 5 min read Published Sep 17, 2026

Automate GST E-Invoicing & IRN Generation

Shubamjeet Singh
Contributor, VectorBloom · Enterprise Automation
Direct Answer (BLUF)
Executive Summary · ~50 words

Automate GST e-invoicing by configuring an n8n webhook to capture ERP sales entries, format them into NIC schema JSON, and send them to an authorized IRP or GSP API. The gateway returns a 64-character Invoice Reference Number (IRN) and signed QR code. n8n then renders a compliant PDF and dispatches it via the WhatsApp Business API.

Summarize with ChatGPT Perplexity Grok

Why does manual e-invoicing break down for Indian SMBs?

Most teams think manual portal uploads save money on software. They’re wrong, and it costs them heavily in compliance penalties.

For growing Indian businesses, billing operations remain fractured. Finance teams create sales entries in custom software. They export spreadsheets. They manually upload JSON batches to the government portal. Then they download signed outputs, emailing or messaging customers separately. This creates huge operational lag. It injects human error into a legally mandated process.

According to Accountune – E-Invoice Limit FY 2026-27: ₹5 Crore Rule, Who Must Comply, as per CBIC Notification No. 10/2023-Central Tax, e-invoicing is compulsory for any registered business in India whose aggregate annual turnover (AATO) exceeded ₹5 crore in any financial year since FY 2017-18. Crossing this threshold leaves zero room for delayed B2B transactions.

Compliance timelines don’t leave room for slacking. According to Tally Solutions – E-Invoicing Rules in India: 2026 Guidelines Explained, taxpayers crossing the threshold face a strict 30-day reporting window. You must report invoices to the IRP within 30 days of the document date. Otherwise, the portal rejects IRN generation. To cut manual delays, combine open automation with custom accounting integrations. You can review similar setups in Tally Prime XML API Automation with n8n.


Is this starting to feel like a lot?

Let us handle the busy work. LoomVector builds and ships this exact kind of system for Indian SMBs, end to end.

Talk to LoomVector

Step-by-Step Implementation: n8n to IRP to WhatsApp

The automation pipeline follows four main execution steps:
ERP Event Webhook → Schema Formatting → IRP Authentication & IRN Retrieval → PDF Rendering & WhatsApp Transmission.

[ERP / Accounting Webhook]
           ↓
   [n8n Code Node] (Construct NIC Schema JSON)
           ↓
 [HTTP Request Node] (IRP / GSP API Request)
           ↓
 [IRP Response Processing] (Extract IRN, AckNo, SignedQRCode)
           ↓
   [HTML/PDF Engine] (Render Compliant Tax Invoice)
           ↓
 [WhatsApp Business API] (Send PDF via Utility Template)

Step 1: Capture ERP Payload and Format NIC JSON Schema

Configure an incoming Webhook node in n8n. Use it to capture finalized sales invoices from your billing system.

In an adjacent Code node, map your line items and tax splits. Format them into the standardized schema required by the Invoice Registration Portal (IRP).

Ensure your JSON maps all mandatory nested objects:

  • TranDtls: Tax scheme and supply type (e.g., B2B).
  • DocDtls: Document type (INV), document number, and document date.
  • SellerDtls and BuyerDtls: Legal name, GSTIN, address, state code, and PIN code.
  • ItemList: Item descriptions, HSN codes, taxable values, CGST/SGST/IGST rates, and amounts.
  • ValDtls: Total invoice value calculations.

Step 2: Integrate with the IRP / GSP Gateway

Connecting directly to the government portal involves heavy infrastructure demands. According to Masters India – API Integration Modes For E-Invoicing, direct API integration with the NIC IRP portal requires testing in a sandbox environment and submitting at least 4 Indian static IP addresses for whitelisting, along with a test summary report sent to [email protected].

Direct whitelisting drains SMB resources. Because of that, most teams route calls through an authorized GST Suvidha Provider (GSP) or API aggregator. Set up your HTTP Request node in n8n. Authenticate against your gateway with your client credentials. Retrieve your token, then issue a POST request containing your structured invoice JSON.

Step 3: Parse the IRP Response

The portal validates the payload and processes the cryptographic signature. According to ClearTax Docs – Generate IRN, upon successful registration of the invoice JSON, the IRP response returns an Acknowledgement Number (AckNo), an Acknowledgement Date (AckDt), a 64-character hash known as the IRN, and a SignedQRCode in JWT string format.

Configure an n8n node to parse this response and store the values:

// Example extraction in an n8n Code Node
const response = $input.first().json;

return {
  irn: response.Irn,
  ackNo: response.AckNo,
  ackDate: response.AckDt,
  signedQrCode: response.SignedQRCode
};

Step 4: Render the Compliant PDF

A legal B2B e-invoice must display the 64-character IRN and the generated QR code. Pass the SignedQRCode string into a QR code generator within n8n. You can also use a self-hosted rendering tool like Gotenberg or Puppeteer.

Inject the base64-encoded QR image, the Irn, and the AckNo into your HTML template. Compile the document into a finalized PDF binary.

Step 5: Dispatch via WhatsApp Business API

After generating the PDF binary, upload the file to your WhatsApp media endpoint. You can also use a secure temporary storage bucket. Use the HTTP Request node to trigger an approved WhatsApp Business API Utility message. Send it straight to the customer’s registered contact number.

The payload passes the document link to the utility template:

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "919876543210",
  "type": "template",
  "template": {
    "name": "tax_invoice_notification",
    "language": {
      "code": "en"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "document",
            "document": {
              "link": "https://storage.yourdomain.com/invoices/INV-2026-001.pdf",
              "filename": "Invoice_INV_2026_001.pdf"
            }
          }
        ]
      },
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "Customer Name" },
          { "type": "text", "text": "INV-2026-001" },
          { "type": "text", "text": "₹1,18,000" }
        ]
      }
    ]
  }
}

If your engineering or finance team needs help designing, deploying, and maintaining resilient webhook integrations between your ERP, government tax gateways, and messaging APIs, LoomVector provides architectural guidance and end-to-end automation builds.

Sources

Checked on 17 Sep 2026 when this guide was researched:

  1. Accountune – E-Invoice Limit FY 2026-27: ₹5 Crore Rule, Who Must Comply accountune.com
  2. Tally Solutions – E-Invoicing Rules in India: 2026 Guidelines Explained tallysolutions.com
  3. Masters India – API Integration Modes For E-Invoicing mastersindia.co
  4. ClearTax Docs – Generate IRN docs.cleartax.in

<!–[googlesitekit-end-of-content]–>

Key Takeaways
3 Points
  1. 01
    Mandatory Turnover Thresholds: Businesses crossing ₹5 crore in aggregate annual turnover in any financial year since FY 2017-18 must generate IRNs to stay compliant under CBIC rules.
  2. 02
    Strict Time Limits: Invoice registration must occur within 30 days of the document date for applicable taxpayers. An automated pipeline trigger is essential.
  3. 03
    Complete Dispatch Pipeline: The workflow isn't complete until you convert the returned 64-character IRN and SignedQRCode JWT into a PDF and send it via an approved WhatsApp utility template.
Get new posts by email

Direct implementation blueprints for Indian SMBs. One email per post, no spam.

By subscribing you agree to receive email updates and our Privacy Policy.

Advertisement
TEST AD SLOT
In-Article (Responsive)
Frequently Asked Questions
Share & Distribute Blueprint

Found this blueprint valuable?

Share with your engineering team, founder circles, or tech communities to accelerate deployment.

Was this helpful?
Shubamjeet Singh
Shubamjeet Singh Contributor, VectorBloom LinkedIn

Shubamjeet writes from six years advising enterprise clients on RPA, BPM, and applied ML — translating what actually pays off at enterprise scale into practical playbooks for Indian SMBs.

Need help implementing this blueprint in production?

LoomVector engineers custom web applications, direct WhatsApp Cloud API integrations, and self-hosted n8n enterprise workflows.

Talk to LoomVector
Link copied to clipboard

Get new posts by email

Direct implementation blueprints for Indian SMBs. No spam.

By subscribing you agree to receive email updates and our Privacy Policy.