n8n

How to Automate Gmail and PDF Inbox Triage?

Turn your inbox and docs into a simple AI workspace. New emails get labeled by intent, your team can ask questions over a PDF library, and a chat agent can check calendar slots and book meetings. It is built for operations and support teams that want faster answers and fewer manual tasks.

Here is how it runs. A Gmail event pulls each new email and an AI model assigns labels like automation or music, then applies them in Gmail. A webhook path can also post details to a Slack channel for quick alerts. For document Q and A, the flow downloads a PDF, splits it into chunks, creates embeddings with an AI model, and stores them in Pinecone. A chat entry searches the vector store and answers with context using an AI chat model. A second chat agent uses another AI model with tools to read calendar availability, keep memory, and confirm a booking.

Setup needs API keys for OpenAI, Anthropic, and Pinecone, plus OAuth for Gmail and Slack. Expect less time on inbox triage, fast answers from long PDFs, and smoother meeting booking. Good fits include support triage, onboarding guides, sales whitepapers, and internal scheduling.

What are the key features?

  • Gmail trigger captures each new email and routes it to an AI labeler
  • OpenAI chat model decides the correct Gmail labels and applies them
  • Webhook to Slack path posts key fields to a chosen channel for quick alerts
  • PDF loader downloads files and splits text into chunks for better search
  • OpenAI embeddings write document vectors to Pinecone for fast retrieval
  • Chat trigger runs retrieval Q and A using a vector store retriever and GPT 4o
  • Anthropic chat agent uses tools to read calendar availability and book meetings with memory

What are the benefits?

  • Reduce inbox triage from 60 minutes a day to 10 minutes with automatic labels
  • Answer PDF questions in seconds without manual searching
  • Cut booking back and forth by auto checking availability and confirming times
  • Connect Gmail, Slack, OpenAI, Anthropic and Pinecone in one flow
  • Handle multiple chat requests at the same time with reliable responses

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Slack, OpenAI, Anthropic, Pinecone and Webhook. See the Tools Required section above for links to create accounts with these services.
  3. In n8n Cloud, open the Gmail trigger node. In the Credential to connect with dropdown, click Create new credential and follow the prompts to connect your Gmail account with OAuth2.
  4. Open the Slack Send message node. Create a new Slack OAuth2 credential, pick the target workspace, and select the channel listed in the node or choose another channel.
  5. Open the OpenAI nodes. Create a new API Key credential by pasting the key from the OpenAI API page. Name the credential clearly such as OpenAI Prod.
  6. Open the Anthropic chat model node. Create a new API Key credential with your key from the Anthropic account page.
  7. Open the Pinecone nodes. Create a new API Key credential using your Pinecone API key and environment. Confirm the index name matches the node settings.
  8. Check the PDF download node. Make sure the file_url field is present in the input items. If you use your own PDFs, update the URLs or input source.
  9. Validate the RAG path: run the PDF load section, then open your Pinecone dashboard to confirm vectors were created. Next, type a chat question and verify a sourced answer returns.
  10. Test Gmail triage: send a test email that matches one of the categories. Confirm the AI adds the correct Gmail label on the message.
  11. Test Slack alerts: send a GET or POST request to the webhook URL with a query parameter called email and confirm the message appears in the channel.
  12. Configure booking tools: open the calendar tool nodes and set any required endpoints or credentials used by your calendar system. Ask the chat agent for a meeting and verify it returns an available slot and a booked event.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Anthropic

Sign up

Pay-as-you-go: Claude 3 Haiku at $0.25 per 1M input tokens and $1.25 per 1M output tokens

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Pinecone

Sign up

Starter (Free): $0 / mo; includes 2 GB storage, 2M write units / mo, 1M read units / mo, up to 5 indexes; API access.

Slack

Sign up

Free plan: $0 / mo; limited to 10 apps (third-party or custom) and usable via Slack API

Webhook

Sign up

Free: $0 / mo; API is public and free; 100 requests per URL; 7-day expiry

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.