WorkflowMCPOpen

Postgrestool Workflow

Triggered manually or by an app event. Connects PostgreSQL, Postgres Tool, Stop And Error, Switch. 1. Set up an MCP Server Trigger [Read more about the MCP Server Trigger]({{ $env.WEBHOOKURL }} 2. Keep Secure by Preventing Raw SQL Statements [Read more about the PostgreSQL Node]({{ $env.WEBHOOKURL }} Whilst it may be easier to just let the Agent provide the full raw SQL statement, it may expose yo

Front matter
name: Postgrestool Workflow
description: Triggered manually or by an app event. Connects PostgreSQL, Postgres Tool, Stop And Error, Switch. ## 1. Set up an MCP Server Trigger [Read more about the MCP Server Trigger]({{ $env.WEBHOOK_URL }} ## 2. Keep Secure by Preventing Raw SQL Statements [Read more about the PostgreSQL Node]({{ $env.WEBHOOK_URL }} Whilst it may be easier to just let the Agent provide the full raw SQL statement, it may expose you or your organisation to a real security risk where in the worst case, data may be unknowingly leaked or deleted. Forcing the agent to provide only the parameters of the query means we can
category: Automation
kind: Workflow
software: PostgreSQL|Postgres Tool|Stop And Error|Switch

Postgrestool Workflow

Triggered manually or by an app event. Connects PostgreSQL, Postgres Tool, Stop And Error, Switch. ## 1. Set up an MCP Server Trigger [Read more about the MCP Server Trigger]({{ $env.WEBHOOK_URL }} ## 2. Keep Secure by Preventing Raw SQL Statements [Read more about the PostgreSQL Node]({{ $env.WEBHOOK_URL }}

Whilst it may be easier to just let the Agent provide the full raw SQL statement, it may expose you or your organisation to a real security risk where in the worst case, data may be unknowingly leaked or deleted.

Forcing the agent to provide only the parameters of the query means we can

Steps

  • GetTableSchema (postgresTool)
  • ListTables (postgresTool)
  • When Executed by Another Workflow (executeWorkflowTrigger)
  • CreateTableRecords (noOp)
  • ReadTableRecord (postgres)
  • Operation (switch)
  • UpdateTableRecord (postgres)
  • UpdateTableRecords (noOp)
  • CreateTableRecord (postgres)
  • ReadTableRows (noOp)
  • Sticky Note (stickyNote)
  • PostgreSQL MCP Server (noOp)
  • Sticky Note1 (stickyNote)
  • Sticky Note2 (stickyNote)
  • Sticky Note3 (stickyNote)
  • Error Handler (stopAndError)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source: https://github.com/Zie619/n8n-workflows/blob/main/Stickynote/0873_Stickynote_Postgrestool_Create_Triggered.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.