Templates / Sync PostgreSQL changes to SharePoint lists via Microsoft Graph with Teams alerts

Sync PostgreSQL changes to SharePoint lists via Microsoft Graph with Teams alerts

Ready for 3.0

by Mychel Garzon ✓ · 17 views · created 2026-06-03 · File Management

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 19 nodes and runs on a schedule (every 15 minutes). Along the way it connects Postgres and Microsoft Teams. It also calls graph.microsoft.com over HTTP.

How it runs

Trigger: On a schedule (every 15 minutes).

  1. Set Configuration Parameters (Edit Fields (Set)): sets 5 fields: sharepointSiteId, sharepointListId, batchSize…
  2. Fetch Last Run Timestamp (Code): runs custom JavaScript code
  3. Query Updated Rows from Postgres (Postgres): run a query
  4. Aggregate Postgres Results (Code): runs custom JavaScript code
  5. Check Rows to Sync (If): checks a condition and branches into true / false
  6. Construct Graph Batch Payloads (Code): runs custom JavaScript code
  7. Update Timestamp No Rows (Code): runs custom JavaScript code
  8. Loop Over Batch Payloads (Loop Over Items (Split in Batches)): loops over the items in batches
  9. Dispatch Sync Summary Note (Microsoft Teams): work with channel message
  10. Post Batch to Graph API (HTTP Request): calls graph.microsoft.com (POST)

…plus 7 more steps. See the full node list below.

Services it uses

PostgresMicrosoft Teams

HTTP calls to: graph.microsoft.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (9)

From the author

Quick overview This workflow runs every 15 minutes and uses a watermark to incrementally sync recently updated rows from PostgreSQL to a Microsoft SharePoint list via the Microsoft Graph $batch API, posting run summaries and deduplicated error alerts to a…

Excerpt from Mychel Garzon's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.