n8n
Workflow
Create A Table In Postgres And Insert Data
This n8n workflow creates tasks and integrates with various services. Create A Table In Postgres And Insert Data - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow creates tasks and integrates with various services. Create A Table In Postgres And Insert Data - ready to import and run in your n8n instance.
Features:
- Automates workflow tasks
- Ready to import into n8n
- Configurable parameters
Source Code
{
"nodes": [
{
"name": "On clicking 'execute'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
260,
290
],
"parameters": [],
"typeVersion": 1,
"id": "3119bf40-1ba7-47a3-ac0d-26d3efe59b5c"
},
{
"name": "Set",
"type": "n8n-nodes-base.set",
"position": [
660,
290
],
"parameters": {
"values": {
"number": [
{
"name": "id"
}
],
"string": [
{
"name": "name",
"value": "n8n"
}
]
},
"options": []
},
"typeVersion": 1,
"alwaysOutputData": false,
"id": "76f1b862-fb03-4110-8c19-bc652160983c"
},
{
"name": "Postgres",
"type": "n8n-nodes-base.postgres",
"position": [
460,
290
],
"parameters": {
"query": "CREATE TABLE test (id INT, name VARCHAR(255), PRIMARY KEY (id));",
"operation": "executeQuery"
},
"credentials": {
"postgres": "postgres_docker_creds"
},
"typeVersion": 1,
"alwaysOutputData": true,
"id": "121b1ad7-9782-4f60-b0d6-e87446dc7ab4"
},
{
"name": "Postgres1",
"type": "n8n-nodes-base.postgres",
"position": [
860,
290
],
"parameters": {
"table": "test",
"columns": "id, name"
},
"credentials": {
"postgres": "postgres_docker_creds"
},
"typeVersion": 1,
"id": "42bc29d8-b9c7-4bd8-ae13-daffdb85226c"
}
],
"connections": {
"Set": {
"main": [
[
{
"node": "Postgres1",
"type": "main",
"index": 0
}
]
]
},
"Postgres": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"On clicking 'execute'": {
"main": [
[
{
"node": "Postgres",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow