Back to Catalog

Create an offline DIGIPIN microservice API for precise location mapping in India

Srinivasan KBSrinivasan KB
206 views
2/3/2026
Official Page

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

What is DIGIPIN? DIGIPIN (Digital Pincode) is a 10-character alphanumeric code introduced by India Post. It maps any 3x3 meter square in India to a unique digital address. This helps precisely locate homes, shops, or landmarks, especially in areas where physical addresses are inconsistent or missing.

What this workflow does This workflow creates a fully offline DIGIPIN microservice using only JavaScript - no external APIs are used.

You get two HTTP endpoints:

  • GET /generate-digipin?lat={latitude}&lon={longitude} → returns a DIGIPIN
  • GET /decode-digipin?digipin={code} → returns the latitude and longitude

You can plug this into any system to:

  • Convert GPS coordinates to a DIGIPIN
  • Convert a DIGIPIN back to coordinates

How it works

  1. An HTTP Webhook node receives the request
  2. A JS Function node either encodes or decodes based on input
  3. The result is returned as a JSON response

All the logic is handled inside the workflow - no API keys, no external calls.

Why use this

  • Fast and lightweight
  • Easily extendable: you can connect this to forms, CRMs, apps, or spreadsheets
  • Ideal for field agents, address validation, logistics, or rural operations

n8n Offline Digipin Microservice API Workflow

This n8n workflow provides a basic framework for an API endpoint that can be extended to create an "offline digipin microservice." It listens for incoming HTTP requests, and then, based on the request, it can be configured to perform different actions and respond accordingly.

What it does

This workflow sets up a foundational API endpoint with conditional logic:

  1. Listens for incoming requests: An HTTP Webhook node acts as the entry point, waiting for any incoming API calls.
  2. Routes based on conditions: A Switch node is positioned to evaluate conditions in the incoming request. This is where you would define different "cases" or "paths" for your microservice (e.g., different API endpoints or commands).
  3. Responds to the caller: A "Respond to Webhook" node is included, ready to send a response back to the client that initiated the API call. This node would typically be configured within each branch of the Switch node to send specific data or status codes.
  4. Includes a Code node for custom logic: A Code node is available, allowing for the execution of custom JavaScript. This is where you would implement the core logic for generating or processing "digipins," interacting with databases (if applicable), or performing any other necessary computations.
  5. Provides a Sticky Note for documentation: A Sticky Note is present for adding internal documentation, explanations, or to-do items directly within the workflow canvas.

Prerequisites/Requirements

  • n8n Instance: A running n8n instance (self-hosted or cloud).
  • Basic API Knowledge: Understanding of how APIs work (HTTP methods, request/response bodies).

Setup/Usage

  1. Import the workflow:
    • In your n8n instance, click "Workflows" in the left sidebar.
    • Click "New Workflow" or import the provided JSON.
  2. Activate the Webhook:
    • The "Webhook" node will automatically generate a unique URL when the workflow is activated. This is your API endpoint.
  3. Configure the Switch Node:
    • Edit the "Switch" node to define your routing logic. You'll likely want to check for specific parameters in the incoming webhook data (e.g., {{ $json.query.action }} or {{ $json.body.command }}).
    • Add branches (outputs) to the Switch node for each distinct action or "digipin" generation scenario you want to support.
  4. Implement Custom Logic (Code Node):
    • Connect the "Code" node to the appropriate branch(es) of your "Switch" node.
    • Edit the "Code" node to write your JavaScript logic for generating, validating, or retrieving "digipins" based on the input.
  5. Configure Webhook Responses:
    • Connect "Respond to Webhook" nodes to the end of each logical path.
    • Configure each "Respond to Webhook" node to send back the appropriate data (e.g., the generated digipin, status messages, error codes) as JSON or plain text.
  6. Activate the Workflow:
    • Once configured, activate the workflow by toggling the "Active" switch in the top right corner of the n8n editor.
  7. Test the API:
    • Use a tool like Postman, Insomnia, curl, or a web browser to send requests to the Webhook URL and test your implemented logic.

This workflow serves as a flexible starting point. You would expand upon the "Code" node and "Switch" logic to build out the specific functionality required for your "offline digipin microservice API for precise location mapping in India."

Related Templates

Daily Magento 2 customer sync to Google Contacts & Sheets without duplicates

Automatically sync newly registered Magento 2 customers to Google Contacts and Google Sheets every 24 hours — with full duplication control and seamless automation. This workflow is a plug-and-play customer contact automation system designed for Magento 2 store owners, marketers, and CRM teams. It fetches customer records registered within the last 24 hours (from 00:00:00 to 23:59:59), checks against an existing Google Sheet to avoid reprocessing, and syncs only the new ones into Google Contacts. This ensures your contact list is always fresh and up to date — without clutter or duplicates. ✅ What This Workflow Does: Automates Customer Syncing Every day, it fetches newly registered Magento 2 customers via API based on the exact date range (midnight to midnight). Deduplicates Using Google Sheets A master Google Sheet tracks already-synced emails. Before adding a customer, the workflow checks this list and skips if already present. Creates Google Contacts Automatically For each unique customer, it creates a new contact in your Google Contacts, saving fields like first name, last name, and email. Logs New Entries to Google Sheets In Google Sheets, it even records magento 2 customer group, createdat, websiteid & store_id After syncing, it adds each new email to the tracking sheet, building a cumulative record of synced contacts. Fully Scheduled & Automated Can be scheduled with the Cron node to run daily (e.g., 12:05 AM) with no manual intervention required. 🔧 Modules Used: HTTP Request (Magento 2 API) Date & Time (for filtering registrations) Google Sheets (for reading/writing synced emails) Google Contacts (for contact creation) Set, IF, and Merge nodes (for control logic) Cron (for scheduling the automation) 💼 Use Cases: Keep your email marketing tools synced with Magento 2 customer data. Build a CRM-friendly contact base in Google Contacts without duplicates. Share customer data with sales or support teams through synced Google Sheets. Reduce manual work and human error in data transfer processes. 🔒 Credentials Required Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token. Google API 📂 Category E-commerce → Magento 2 (Adobe Commerce) 💬 Need Help? 💡 Having trouble setting it up or want to customize this workflow further? Feel free to reach out — I’m happy to help with setup, customization, or Magento 2 API integration issues. Contact: Author 👤 Author Kanaka Kishore Kandregula Certified Magento 2 Developer https://gravatar.com/kmyprojects https://www.linkedin.com/in/kanakakishore

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
163

Send RSS feed data to webhook

Filters articles based on keywords, checks against MongoDB for unique links, then sends results to different webhooks

daveBy dave
3968

Run bulk RAG queries from CSV with Lookio

This template processes a CSV of questions and returns an enriched CSV with RAG-based answers produced by your Lookio assistant. Upload a CSV that contains a column named Query, and the workflow will loop through every row, call the Lookio API, and append a Response column containing the assistant's answer. It's ideal for batch tasks like drafting RFP responses, pre-filling support replies, generating knowledge-checked summaries, or validating large lists of product/customer questions against your internal documentation. Who is this for? Knowledge managers & technical writers: Produce draft answers to large question sets using your company docs. Sales & proposal teams: Auto-generate RFP answer drafts informed by internal docs. Support & operations teams: Bulk-enrich FAQs or support ticket templates with authoritative responses. Automation builders: Integrate Lookio-powered retrieval into bulk data pipelines. What it does / What problem does this solve? Automates bulk queries: Eliminates the manual process of running many individual lookups. Ensures answers are grounded: Responses come from your uploaded documents via Lookio, reducing hallucinations. Produces ready-to-use output: Delivers an enriched CSV with a new Response column for downstream use. Simple UX: Users only need to upload a CSV with a Query column and download the resulting file. How it works Form submission: User uploads a CSV via the Form Trigger. Extract & validate: Extract all rows reads the CSV and Aggregate rows checks for a Query column. Per-row loop: Split Out and Loop Over Queries iterate rows; Isolate the Query column normalizes data. Call Lookio: Lookio API call posts each query to your assistant and returns the answer. Build output: Prepare output appends Response values and Generate enriched CSV creates the downloadable file delivered by Form ending and file download. Why use Lookio for high quality RAG? While building a native RAG pipeline in n8n offers granular control, achieving consistently high-quality and reliable results requires significant effort in data processing, chunking strategy, and retrieval logic optimization. Lookio is designed to address these challenges by providing a managed RAG service accessible via a simple API. It handles the entire backend pipeline—from processing various document formats to employing advanced retrieval techniques—allowing you to integrate a production-ready knowledge source into your workflows. This approach lets you focus on building your automation in n8n, rather than managing the complexities of a RAG infrastructure. How to set up Create a Lookio assistant: Sign up at https://www.lookio.app/, upload documents, and create an assistant. Get credentials: Copy your Lookio API Key and Assistant ID. Configure the workflow nodes: In the Lookio API call HTTP Request node, replace the apikey header value with your Lookio API Key and update assistantid with your Assistant ID (replace placeholders like <your-lookio-api-key> and <your-assistant-id>). Ensure the Form Trigger is enabled and accepts a .csv file. CSV format: Ensure the input CSV has a column named Query (case-sensitive as configured). Activate the workflow: Run a test upload and download the enriched CSV. Requirements An n8n instance with the ability to host Forms and run workflows A Lookio account (API Key) and an Assistant ID How to take it further Add rate limiting / retries: Insert error handling and delay nodes to respect API limits for large batches. Improve the speed: You could drastically reduce the processing time by parallelizing the queries instead of doing them one after the other in the loop. For that, you could use HTTP request nodes that would trigger your sort of sub-workflow. Store results: Add an Airtable or Google Sheets node to archive questions and responses for audit and reuse. Post-process answers: Add an LLM node to summarize or standardize responses, or to add confidence flags. Trigger variations: Replace the Form Trigger with a Google Drive or Airtable trigger to process CSVs automatically from a folder or table.

Guillaume DuvernayBy Guillaume Duvernay
293