Skip to main content

Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone

Workflow preview

Workflow preview
100%
Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone preview
Open on n8n.io

1. Workflow Overview

This template gives your HR or operations team an AI powered Slack bot that answers employee questions about internal policies — directly in DM, available to everyone in the workspace, with no per ...

Best for

  • Internal Wiki automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.googledrive, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.aggregate

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone
Workflow name
Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone

This template gives your HR or operations team an AI-powered Slack bot that answers employee questions about internal policies — directly in DM, available to everyone in the workspace, with no per-user setup required.

Employees simply send a direct message to the bot. It searches your Google Drive HR documents using RAG (Retrieval-Augmented Generation) via Pinecone, and replies in the same thread using GPT-4.1 — based strictly on your documents, not general knowledge.

Who this is for HR, operations, and IT teams who want to reduce repetitive policy questions (leave, expenses, remote work, etc.) without building a custom chatbot from scratch.

What's included This template contains two workflows on a single canvas:

  1. HR Document Indexer — Runs daily at 3:00 AM. Indexes all documents in a specified Google Drive folder into Pinecone automatically.
  2. HR QA Bot — Listens for Slack DMs workspace-wide. Filters out bot messages to prevent infinite loops, retrieves relevant document chunks, generates an answer, and replies in-thread.

A built-in RAG quality evaluator automatically scores every response (faithfulness & answer relevancy) and logs results to Google Sheets for continuous quality monitoring.

Key features

  • Works for the entire Slack workspace with a single setup — no per-user configuration
  • Strictly document-grounded answers — the bot will not hallucinate outside your documents
  • Infinite loop prevention via bot_id filtering
  • Automatic daily re-indexing with duplicate prevention (namespace clear before upsert)
  • Built-in answer quality logging to Google Sheets

Prerequisites

  • Google Drive folder with HR documents (txt, pdf, docx)
  • Pinecone account (index: dimension 1536, metric cosine)
  • OpenAI API key
  • Slack App with DM permissions (setup guide included in the workflow)
  • Google Sheets (copy link provided in the workflow)

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 - Daily Index Refresh (3:00 AM)

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Set Folder Config

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

Block 3 - List Drive Files

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

Block 4 - Download File

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

Block 5 - Extract Text

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

Block 6 - Upsert to Pinecone

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.3

Block 7 - Load Document

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 8 - Split into Chunks

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 9 - Search Pinecone

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.3

Block 10 - Aggregate Context

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

Block 11 - HR QA Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 12 - GPT-4.1 (QA)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 13 - RAG Quality Evaluator

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.9

Block 14 - Slack Trigger

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

Block 15 - Filter: DM Only (Not Bot)

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

Block 16 - Log Eval to Sheets

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

Block 17 - GPT-5 mini (Eval)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 18 - OpenAI Embeddings (Chat)

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 19 - OpenAI Embeddings (Index)

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 20 - Reply to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 21 - Sticky Note

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

Block 22 - Sticky Note1

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

Block 23 - Sticky Note2

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

Block 24 - Sticky Note3

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

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone
Complexity advanced
Nodes 31
Categories Internal Wiki, AI RAG
Author Shohei Sawada
Published 10 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14968/14968.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 Answer HR policy questions in Slack DMs with GPT-4.1, Google Drive and Pinecone do?

This template gives your HR or operations team an AI powered Slack bot that answers employee questions about internal policies — directly in DM, available to everyone in the workspace, with no per ...

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 Internal Wiki, AI RAG use case.