Manage job records via webhook REST API with PostgreSQL
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Postgres.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Switch: routes items into 4 branches
- Get All Jobs (Postgres): run a query
- Create Job (Postgres): run a query
- Update Job (Postgres): run a query
- Delete Job (Postgres): run a query
- Return Job List (Respond to Webhook): sends the response back to the webhook caller
- Error During Fetching Jobs (Respond to Webhook): sends the response back to the webhook caller
- Return Success Response (Respond to Webhook): sends the response back to the webhook caller
- Error during job creation (Respond to Webhook): sends the response back to the webhook caller
- Error during job details update (Respond to Webhook): sends the response back to the webhook caller
…plus 1 more step. See the full node list below.
Services it uses
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 (4)
- Webhook
n8n-nodes-base.webhook - Switch
n8n-nodes-base.switch - Postgres
n8n-nodes-base.postgres - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow exposes a header-authenticated webhook REST API that performs CRUD operations on a PostgreSQL jobs table, letting you create, list, update, and delete job records and returning either JSON results or an error message to the…