Workflow

Extract Abbreviations from Knowledge Base

Automatically extract abbreviations from documents in your knowledge base and compile them into a structured Google Sheet or Google Doc directory with definitions.

Needle Team

Last updated

November 3, 2025

Connectors used

Google Sheets

Tags

Knowledge ManagementDocumentation AutomationGlossary BuilderTechnical Documentation

Video Tutorial

Key Takeaways

  • Scans your document collection - Loops through files in a Needle collection to find abbreviations and their definitions.
  • Structured AI extraction - Uses GPT-4.1 with structured output to return abbreviations as word, abbreviation, and definition triplets.
  • Outputs to Google Sheets - Writes results to a Google Sheet, checking for duplicates before adding new entries.
  • Handles pagination - Processes files in batches of 20 with automatic pagination through your entire collection.
  • Manual trigger - You run it when you have documents ready to process.

What This Workflow Does

This workflow reads documents from a Needle collection, uses AI to extract abbreviations and their definitions, and compiles them into a Google Sheet. It loops through your files in batches, extracts abbreviations from each file, checks against existing entries in the sheet to avoid duplicates, and adds only new ones. It is designed for building glossaries or abbreviation directories from technical documentation, policies, or internal wikis.

Use cases:

  • Building an onboarding glossary from internal documentation
  • Maintaining an abbreviation directory for technical or compliance documents
  • Creating a searchable reference sheet from research papers or knowledge base articles

How It Works

StepWhat Happens
1. Manual TriggerYou start the workflow when documents are ready.
2. LoopPaginates through files in your Needle collection, 20 at a time.
3. List FilesFetches a batch of files from the collection using offset-based pagination.
4. TransformFlattens the file list for processing.
5. Get File ContentsExtracts text content from each file.
6. AI Extract AbbreviationsGPT-4.1 identifies abbreviations and returns structured triplets (word, abbreviation, definition).
7. Get Values in RangeReads existing entries from the Google Sheet.
8. MergeCombines the newly extracted abbreviations with existing sheet data.
9. AI Write to SheetAn AI agent with Google Sheets tools checks for duplicates and adds new entries.

Workflow Nodes

NodeRole
Manual TriggerStarts the workflow on demand
LoopPaginates through files with a configurable iteration limit (up to 20 iterations)
List FilesFetches files from a Needle collection with offset-based pagination
TransformFlattens nested file data into a single list
Get File ContentsRetrieves text content from each document
AI Agent (Extract)Uses GPT-4.1 to extract abbreviations as structured output (word, abbreviation, definition)
Google Sheets Get Values in RangeReads existing data from the target Google Sheet
MergeCombines extracted abbreviations with existing sheet entries
AI Agent (Write)Uses GPT-4.1 with Google Sheets tools to add new, non-duplicate abbreviations to the sheet

Setup Instructions

  1. Add the "Extract Abbreviations from Knowledge Base" template to your Needle workspace.
  2. Upload your documents (PDFs, Word docs, markdown, text files) to a Needle collection.
  3. Open the List Files node and select your collection.
  4. Create a Google Sheet with columns: Word, Abbreviation, Definition.
  5. Connect your Google Sheets account by creating a Google Sheets connector in Needle.
  6. Update the Get Values in Range node with your Google Sheet URL.
  7. Update the AI Write node's system prompt with your Google Sheet URL.
  8. Select your Google Sheets connector in the relevant nodes.
  9. Click the manual trigger to run the workflow.

Customization

What You Can ChangeHow
Document collectionSelect a different Needle collection in the List Files node
Output destinationReplace Google Sheets nodes with Google Docs nodes for a formatted glossary instead of a spreadsheet
AI extraction focusModify the AI prompt to target specific types of abbreviations (technical, business, industry-specific)
Pagination batch sizeAdjust the loop condition and offset calculation to process more or fewer files per iteration
Google Sheet columnsUpdate the AI Write node's system prompt to match a different column structure

FAQ

Q: What file types does this support? A: It works with any files uploaded to a Needle collection, including PDFs, Word documents, markdown, and plain text files.

Q: How does it handle duplicates? A: The AI Write node reads the existing Google Sheet data and only adds abbreviations that are not already present.

Q: Can I output to Google Docs instead of Sheets? A: Yes. You can replace the Google Sheets nodes and tools with Google Docs equivalents for a formatted glossary document.

Q: What if a document has no abbreviations? A: The AI extraction node will return an empty list for that file, and the workflow will continue to the next one.

Want to showcase your own workflows?

Become a Needle workflow partner and turn your expertise into recurring revenue.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .