npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-google-docs-template

v0.1.7

Published

n8n node to create Google Docs from templates with placeholder replacement

Readme

n8n-nodes-google-docs-template

Custom n8n node for creating Google Docs from templates with placeholder replacement.

Features

  • Create from Template: Copy a Google Doc template and replace placeholders in one operation
  • Replace Placeholders: Update placeholders in an existing document
  • Multiple placeholder formats: {{var}}, ${var}, [var], {var}, <<var>>
  • Case-sensitive matching: Optional case sensitivity for placeholder matching
  • Destination folder: Specify where to save the new document

Installation

Local Development

# Install dependencies
npm install

# Build the project
npm run build

# Link to n8n (run from this project directory)
npm link

# Then in your n8n custom nodes directory (~/.n8n/custom or equivalent)
npm link n8n-nodes-google-docs-template

# Restart n8n

Docker

Add to your Dockerfile:

FROM n8nio/n8n

# Copy the built node
COPY dist /home/node/.n8n/custom/n8n-nodes-google-docs-template/dist
COPY package.json /home/node/.n8n/custom/n8n-nodes-google-docs-template/

Community Node (npm)

# In your n8n instance
npm install n8n-nodes-google-docs-template

Google Cloud Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Enable the following APIs:
    • Google Docs API
    • Google Drive API
  4. Go to APIs & Services > Credentials
  5. Click Create Credentials > OAuth client ID
  6. Select Web application
  7. Add authorized redirect URI: https://your-n8n-url/rest/oauth2-credential/callback
  8. Copy the Client ID and Client Secret

n8n Credential Setup

  1. In n8n, go to Credentials
  2. Click Add Credential
  3. Search for Google Docs Template OAuth2 API
  4. Enter your Client ID and Client Secret
  5. Click Sign in with Google and authorize

Usage

Create from Template

  1. Create a Google Doc template with placeholders like {{client_name}}, {{date}}, etc.
  2. Copy the template's Document ID from the URL: https://docs.google.com/document/d/DOCUMENT_ID_HERE/edit
  3. Add the Google Docs Template node to your workflow
  4. Select Create from Template operation
  5. Enter the Template Document ID
  6. Enter the new document name
  7. Add your placeholders (key/value pairs)

Replace Placeholders

  1. Use this to update an existing document
  2. Select Replace Placeholders operation
  3. Enter the Document ID
  4. Add your placeholders

Example Workflow

{
  "nodes": [
    {
      "name": "Google Docs Template",
      "type": "n8n-nodes-google-docs-template.googleDocsTemplate",
      "parameters": {
        "operation": "createFromTemplate",
        "templateId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
        "newDocumentName": "Contract_{{ $json.client_name }}_2024",
        "placeholders": {
          "placeholder": [
            { "key": "client_name", "value": "={{ $json.client_name }}" },
            { "key": "date", "value": "={{ $now.format('MMMM D, YYYY') }}" },
            { "key": "amount", "value": "={{ $json.contract_amount }}" }
          ]
        }
      }
    }
  ]
}

Output

The node returns:

{
  "success": true,
  "operation": "createFromTemplate",
  "documentId": "new-document-id",
  "documentName": "Contract_ClientName_2024",
  "documentUrl": "https://docs.google.com/document/d/new-document-id/edit",
  "templateId": "original-template-id",
  "destinationFolderId": "folder-id-or-root",
  "placeholdersProvided": 3,
  "replacementsMade": 15
}

Development

# Watch mode for development
npm run dev

# Lint
npm run lint

# Fix lint issues
npm run lintfix

# Build for production
npm run build

License

MIT