Skip to main content

Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama

Workflow preview

Workflow preview
100%
Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow receives GDPR data subject access requests via a webhook, searches Microsoft 365 for related emails and documents using Microsoft Graph eDiscovery and SharePoint search...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.microsoftsharepoint, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmollama

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama
Workflow name
Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama

Quick Overview

This workflow receives GDPR data subject access requests via a webhook, searches Microsoft 365 for related emails and documents using Microsoft Graph eDiscovery and SharePoint search, drafts a DPO cover letter with a local Ollama model, archives a report to SharePoint, logs the request to Excel, and notifies the DPO.

How it works

  1. Receives a DSAR request via a POST webhook and validates required fields like the data subject’s email address.
  2. Creates a Microsoft Graph eDiscovery case and a tenant-wide eDiscovery search across all Exchange Online mailboxes for messages involving the subject.
  3. Starts an asynchronous eDiscovery statistics estimate, waits, and then fetches the latest estimate results (mailbox and item counts).
  4. Searches SharePoint Online and OneDrive for Business for matching items in Microsoft 365.
  5. Aggregates and sanitizes the findings into counts and file links, then uses a local Ollama (via LangChain) model to draft a short cover letter using only the statistics.
  6. Builds a text report, uploads it to a restricted SharePoint library, appends/updates a compliance register in Microsoft Excel, emails the internal DPO team for review, and returns a 200 Accepted webhook response with request metadata.

Setup

  1. Configure Microsoft Graph OAuth2 credentials with application permissions for the Security/eDiscovery endpoints (for example, eDiscovery.ReadWrite.All) and ensure admin consent is granted.
  2. Configure Microsoft SharePoint OAuth2 credentials with permissions to search and upload files (for example, Sites.Read.All and Files.Read.All) and select the target SharePoint site/library for archiving.
  3. Configure Microsoft Outlook and Microsoft Excel credentials, set the DPO/Legal recipient address, and point the Excel node at your compliance register workbook/table stored in SharePoint.
  4. Set up Ollama (pull the llama3 model and ensure the Ollama base URL is reachable from n8n) for the cover letter generation step.
  5. Copy the production webhook URL for the DSAR endpoint and configure your intake form or portal to POST the expected fields (subjectName, subjectEmail, requestType, requestDate, requestRef).

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 - DSAR Webhook Trigger

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 2 - Validate and Prepare DSAR

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Create eDiscovery Case

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Create eDiscovery Search (All Mailboxes)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Trigger Statistics Estimate

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Wait for Estimate to Complete

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

Block 7 - Fetch eDiscovery Statistics

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Search SharePoint + OneDrive

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

Block 9 - Merge Email + SP Results

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

Block 10 - Aggregate and Sanitize Results

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Generate Cover Letter (Basic LLM Chain)

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

Block 12 - Ollama Model

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

Block 13 - Build GDPR Report Document

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Convert Report to Binary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Archive Report to SharePoint GDPR Library

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

Block 16 - Log DSAR to Compliance Register

Type / Role
n8n-nodes-base.microsoftExcel - microsoftExcel
Config choices
Version 2

Block 17 - Notify DPO for Review (NOT Data Subject)

Type / Role
n8n-nodes-base.microsoftOutlook - microsoftOutlook
Config choices
Version 2

Block 18 - Merge A – SP Archive + Excel Log

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

Block 19 - Merge B – (SP+Excel) + DPO Email

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

Block 20 - Respond 200 Accepted

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

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 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama
Complexity advanced
Nodes 26
Categories Document Extraction, AI Summarization
Author Mychel Garzon
Published 09 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16194/16194.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 Handle GDPR data subject requests with Microsoft Graph, SharePoint, and Ollama do?

Quick Overview This workflow receives GDPR data subject access requests via a webhook, searches Microsoft 365 for related emails and documents using Microsoft Graph eDiscovery and SharePoint search...

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 Document Extraction, AI Summarization use case.