Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save peterjaap/7fb63151a0a8c523e48d51c86558e860 to your computer and use it in GitHub Desktop.
Save peterjaap/7fb63151a0a8c523e48d51c86558e860 to your computer and use it in GitHub Desktop.
N8N.io Workflow PHP packages composer.lock Magento projects
{
"name": "PHP packages composer.lock Magento projects",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "24577e32-bda2-48d3-9721-509294f9cc89",
"options": {}
},
"id": "525eb7eb-bdcb-4a47-a5a1-dc84d166c8a3",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
1160,
720
],
"webhookId": "24577e32-bda2-48d3-9721-509294f9cc89"
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "Project",
"value": "={{ $('Webhook').first().json.headers.project }}"
},
{
"name": "Name",
"value": "={{ $json.name }}"
},
{
"name": "Version",
"value": "={{ $json.version }}"
},
{
"name": "Description",
"value": "={{ $json.description }}"
},
{
"name": "Source",
"value": "={{ $json.source.url }}"
},
{
"name": "Dist",
"value": "={{ $json.dist.url }}"
},
{
"name": "Type",
"value": "={{ $json.type }}"
},
{
"name": "Homepage",
"value": "={{ $json.homepage }}"
},
{
"name": "Dev package",
"value": "Yes"
}
]
},
"options": {}
},
"id": "fea66a24-30e6-4818-a535-944613a12cbf",
"name": "Set dev packages",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1580,
820
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "Project",
"value": "={{ $('Webhook').first().json.headers.project }}"
},
{
"name": "Name",
"value": "={{ $json.name }}"
},
{
"name": "Version",
"value": "={{ $json.version }}"
},
{
"name": "Description",
"value": "={{ $json.description }}"
},
{
"name": "Source",
"value": "={{ $json.source.url }}"
},
{
"name": "Dist",
"value": "={{ $json.dist.url }}"
},
{
"name": "Type",
"value": "={{ $json.type }}"
},
{
"name": "Homepage",
"value": "={{ $json.homepage }}"
},
{
"name": "Dev package",
"value": "No"
}
]
},
"options": {}
},
"id": "f905f295-07c1-40ff-8170-f8b6cce26479",
"name": "Set packages",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1580,
620
]
},
{
"parameters": {
"jsCode": "return $input.first().json.body[\"packages-dev\"];"
},
"id": "66b5d9b4-6c66-4928-9db4-67fbea65b6c1",
"name": "Get dev packages",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
1360,
820
]
},
{
"parameters": {
"jsCode": "return $input.first().json.body.packages;"
},
"id": "504e40c2-507d-4bcb-8a3f-5684aca27957",
"name": "Get packages",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
1360,
620
]
},
{
"parameters": {
"operation": "list",
"application": {
"__rl": true,
"value": "appbg8HXV7I3VgaGp",
"mode": "id"
},
"table": {
"__rl": true,
"value": "tblDQLgMfuYQ0zxkr",
"mode": "id"
},
"additionalOptions": {
"fields": [],
"filterByFormula": "={Project} = '{{ $json.Project }}'"
}
},
"id": "04ee38d2-4f12-4eb4-ba71-c74a8e84ad40",
"name": "Find all records for given project",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
1800,
620
],
"credentials": {
"airtableApi": {
"id": "1",
"name": "Airtable account"
}
}
},
{
"parameters": {
"operation": "delete",
"application": {
"__rl": true,
"value": "appbg8HXV7I3VgaGp",
"mode": "id"
},
"table": {
"__rl": true,
"value": "tblDQLgMfuYQ0zxkr",
"mode": "id"
},
"id": "={{ $json.id }}",
"options": {}
},
"id": "242724a3-587d-497a-870e-a6f5e2e35909",
"name": "Delete all records for given project",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
2020,
620
],
"credentials": {
"airtableApi": {
"id": "1",
"name": "Airtable account"
}
}
},
{
"parameters": {
"operation": "append",
"application": {
"__rl": true,
"value": "appbg8HXV7I3VgaGp",
"mode": "id"
},
"table": {
"__rl": true,
"value": "tblDQLgMfuYQ0zxkr",
"mode": "id"
},
"options": {}
},
"id": "def3ce10-bcea-435f-aa4b-6920ffcf3f40",
"name": "Add records for given project",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
1800,
820
],
"credentials": {
"airtableApi": {
"id": "1",
"name": "Airtable account"
}
}
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Get packages",
"type": "main",
"index": 0
},
{
"node": "Get dev packages",
"type": "main",
"index": 0
}
]
]
},
"Set dev packages": {
"main": [
[
{
"node": "Find all records for given project",
"type": "main",
"index": 0
},
{
"node": "Add records for given project",
"type": "main",
"index": 0
}
]
]
},
"Set packages": {
"main": [
[
{
"node": "Find all records for given project",
"type": "main",
"index": 0
},
{
"node": "Add records for given project",
"type": "main",
"index": 0
}
]
]
},
"Get dev packages": {
"main": [
[
{
"node": "Set dev packages",
"type": "main",
"index": 0
}
]
]
},
"Get packages": {
"main": [
[
{
"node": "Set packages",
"type": "main",
"index": 0
}
]
]
},
"Find all records for given project": {
"main": [
[
{
"node": "Delete all records for given project",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {},
"versionId": "c27c4fef-72f3-4aad-8a98-01959c7af3a7",
"id": "1",
"meta": {
"instanceId": "f49bed7cd35493937b4c9da5eecc1ccedaa9dd644c60be23618755ce1b39beba"
},
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment