Skip to main content

Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC

Workflow preview

Workflow preview
100%
Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

BACKGROUND Malaysia's Inland Revenue (LHDN) provides an API to get the tax id number for a business entity, based on a given Business Registration number (BRN or SSM), or NRIC (MyKad). PROBLEM Howe...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.manualtrigger, n8n-nodes-base.wait, n8n-nodes-base.stickynote, n8n-nodes-base.splitinbatches, n8n-nodes-base.switch, n8n-nodes-base.if, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Alex Halfborg.

Original n8n.io source

1.1 Workflow description

Title
Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC
Workflow name
Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC

BACKGROUND

Malaysia's Inland Revenue (LHDN) provides an API to get the tax id number for a business entity, based on a given Business Registration number (BRN or SSM), or NRIC (MyKad).

PROBLEM

However, the API only allows one search at a time.

SOLUTION

This free workflow lets you do a batch search to get TIN for multiple SSM or NRIC.

This is useful if you need to prepare your internal DB for e-invoicing

PRE-REQUISITES

  1. Get your connection client id and client secret from myhasil.gov.my website

  2. Prepare your Google Sheet containing a list of SSM and NRIC you want to get the TIN

  3. Create N8N credential to connect to your google sheet above

SUPPORT

Questions? Ask alex at halfborg dot com

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Search Taxpayer TIN

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 2 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 3 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 6 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 7 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Setup GSheet Connection

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Setup LHDN Connection

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Remember token expiry

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Compare token expiry vs now

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Wait until token fully expired

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 15 - Update Google Sheet with TIN not found

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.1

Block 16 - Update Google Sheet with failure

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.1

Block 17 - Update Google Sheet with found TIN

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.1

Block 18 - Get all Google Sheet records to process

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.1

Block 19 - Get new LHDN API Token

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 20 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC
Complexity advanced
Nodes 20
Categories Document Extraction
Author Alex Halfborg
Published 08 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4781/4781.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Get Malaysia tax ID number (TIN) for multiple business reg num (SSM) or NRIC do?

BACKGROUND Malaysia's Inland Revenue (LHDN) provides an API to get the tax id number for a business entity, based on a given Business Registration number (BRN or SSM), or NRIC (MyKad). PROBLEM Howe...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.