This workflow follows the Emailsend → Postgres recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"updatedAt": "2026-06-19T13:25:34.671Z",
"createdAt": "2026-06-01T08:05:32.731Z",
"id": "9z4hRpQRHcHn1c2K",
"name": "Nxclinical_uploder",
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-432,
-80
],
"id": "d564bb05-b118-4bc3-af13-14b7f5936ad1",
"name": "When clicking \u2018Execute workflow\u2019"
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT \n doa.uniqueref AS operation_ref,\n doa.idat_ref,\n dor.uniqueref AS recipe_ref,\n dor.account_id,\n dor.pipeline_id\nFROM data_operations_array doa\nJOIN data_operation_recipes dor ON dor.uniqueref = doa.recipe_ref\nWHERE doa.status_concept_ref = 24\nAND dor.type_concept_ref = 251\nORDER BY dor.uniqueref, doa.uniqueref;",
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
-224,
-80
],
"id": "ab8373ee-c826-496f-aaeb-1ad0000789b2",
"name": "get_upload_operations",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const items = $input.all().map(i => i.json);\n\nconst groups = {};\nfor (const item of items) {\n const key = item.recipe_ref;\n if (!groups[key]) {\n const [server, port] = item.account_id.split(',');\n const [sampleType, processingSetting] = item.pipeline_id.split(',');\n groups[key] = {\n recipe_ref: item.recipe_ref,\n server: server.trim(),\n port: port.trim(),\n sample_type: sampleType.trim(),\n processing_setting: processingSetting.trim(),\n operations: []\n };\n }\n groups[key].operations.push({\n operation_ref: item.operation_ref,\n idat_ref: item.idat_ref\n });\n}\n\nreturn Object.values(groups).map(g => ({ \n json: {\n ...g,\n operations: JSON.stringify(g.operations)\n } \n}));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-16,
-80
],
"id": "3231deab-8dcc-49ea-93fb-705528a89fa8",
"name": "group_by_recipe"
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT \n i.uniqueref AS idat_ref,\n i.sample_id,\n i.position,\n s.sentrix_id\nFROM idats i\nJOIN scans s ON s.uniqueref = i.scan_ref\nWHERE i.uniqueref IN (\n SELECT (value->>'idat_ref')::bigint\n FROM jsonb_array_elements(('{{ $json.operations }}'::text)::jsonb) AS value\n);",
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
496,
-64
],
"id": "c5ff6bfc-e6ea-4acf-93f5-2ee9d7d30993",
"name": "get_idats",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const idats = $input.all().map(i => i.json);\nconst loopItem = $('group_by_recipe').item.json;\n\nconst sampleType = loopItem.sample_type;\nconst processingSetting = loopItem.processing_setting;\n\nconst header = 'Sample Name\\tFilename\\tSample Type\\tProcessing Setting\\tDisplay Name';\n\nconst rows = idats.map(idat => {\n const sampleName = `${idat.sentrix_id}_${idat.position}`;\n const filename = `/volume1/ALLDATA/Scans/GTCs/${idat.sentrix_id}_${idat.position}.gtc`;\n return `${sampleName}\\t${filename}\\t${sampleType}\\t${processingSetting}\\t${idat.sample_id}`;\n});\n\nconst batchContent = [header, ...rows].join('\\n');\n\nreturn [{\n json: {\n batch_content: batchContent,\n server: loopItem.server,\n port: loopItem.port,\n recipe_ref: loopItem.recipe_ref,\n operations: loopItem.operations\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
704,
-64
],
"id": "f060e1bd-c41d-4cbe-b97f-e9d1437d1df9",
"name": "build_batch_txt"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
192,
-80
],
"id": "08ef0dfd-686c-4187-9111-b05766aa4307",
"name": "Loop Over Items"
},
{
"parameters": {
"command": "=cat > /home/genera/nxclinical/batch.txt << 'BATCHEOF'\n{{ $json.batch_content }}\nBATCHEOF"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
896,
-64
],
"id": "e9a1bf68-4cc8-4f20-bf87-318456295bb0",
"name": "write_batch_file"
},
{
"parameters": {
"command": "=export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 && export PATH=$JAVA_HOME/bin:$PATH && \"/home/genera/nxclinical/BioDiscovery/NxClinical Sample Importer/NxClinicalSampleImporter\" -server={{ $('build_batch_txt').item.json.server }} -port={{ $('build_batch_txt').item.json.port }} -user=gulsahsimsir -password=gulsah123 -descriptorFile=\"/home/genera/nxclinical/batch.txt\" -overrideExisting=true"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
1088,
-64
],
"id": "1a98b8d0-4468-491c-9baa-2c5022131db4",
"name": "run_nxclinical"
},
{
"parameters": {
"operation": "executeQuery",
"query": "UPDATE data_operations_array\nSET status_concept_ref = 29,\n performed_at = NOW(),\n updated_at = NOW()\nWHERE uniqueref IN (\n SELECT (value->>'operation_ref')::bigint\n FROM jsonb_array_elements(('{{ $('build_batch_txt').item.json.operations }}'::text)::jsonb) AS value\n);",
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
1280,
-64
],
"id": "c4bf8a00-dd2e-4d17-a9b6-a3911d246323",
"name": "update_operations_completed",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"command": "rm /home/genera/nxclinical/batch.txt"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
1904,
-64
],
"id": "0cfcb9a8-4498-4fb5-8cbd-02b95f176e3e",
"name": "delete_batch_file"
},
{
"parameters": {
"fromEmail": "bioinf.notify@gen-era.tech",
"toEmail": "hande.beklen@gen-era.com.tr",
"subject": "NxClinical Y\u00fckleme Bildirimi",
"html": "={{ $json.email_body }}",
"options": {}
},
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
848,
-352
],
"id": "6dc27558-d57f-472d-a3f2-06f9e8e7a8ae",
"name": "Send email",
"credentials": {
"smtp": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT DISTINCT\n i.sample_id\nFROM data_operations_array doa\nJOIN idats i ON i.uniqueref = doa.idat_ref\nWHERE doa.status_concept_ref = 29\nAND doa.recipe_ref IN (457, 490)\nAND doa.performed_at >= NOW() - INTERVAL '1 hour';",
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
448,
-352
],
"id": "794d4a1e-9453-4939-90eb-9014c4d4af06",
"name": "get_completed_operations",
"executeOnce": true,
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const items = $input.all().map(i => i.json);\n\nconst sampleList = items.map(i => `<li>${i.sample_id}</li>`).join('\\n');\n\nconst body = `\n<p>A\u015fa\u011f\u0131daki \u00f6rnekler NxClinical platformuna y\u00fcklenmi\u015ftir.</p>\n<ul>\n${sampleList}\n</ul>\n`;\n\nreturn [{\n json: {\n email_body: body\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
656,
-352
],
"id": "02081272-447d-4cec-b006-01082170b98a",
"name": "build_email_content"
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT\n p.id AS operator_email,\n p.name AS operator_name,\n\n doa.recipe_ref,\n\n STRING_AGG(DISTINCT s.sentrix_id, ', ' ORDER BY s.sentrix_id) AS run_ids,\n STRING_AGG(DISTINCT cs.care_site_name, ', ' ORDER BY cs.care_site_name) AS sample_owners,\n\n STRING_AGG(DISTINCT dor.account_id, ', ' ORDER BY dor.account_id) AS account_id,\n\n STRING_AGG(DISTINCT k.name, ', ' ORDER BY k.name) AS kit_names,\n\n STRING_AGG(\n DISTINCT COALESCE(\n NULLIF(dor.pipeline_name, ''),\n NULLIF(split_part(dor.pipeline_id, ',', 2), ''),\n NULLIF(split_part(dor.pipeline_id, ',', 1), ''),\n '-'\n ),\n ', '\n ORDER BY COALESCE(\n NULLIF(dor.pipeline_name, ''),\n NULLIF(split_part(dor.pipeline_id, ',', 2), ''),\n NULLIF(split_part(dor.pipeline_id, ',', 1), ''),\n '-'\n )\n ) AS pipeline_name,\n\n COUNT(DISTINCT doa.uniqueref) AS total_data_operations,\n STRING_AGG(DISTINCT i.sample_id, ', ' ORDER BY i.sample_id) AS sample_ids\n\nFROM data_operations_array doa\n\nJOIN providers p\n ON p.uniqueref = doa.operator_ref\n\nJOIN idats i\n ON i.uniqueref = doa.idat_ref\n\nJOIN scans s\n ON s.uniqueref = i.scan_ref\n\nJOIN data_operation_recipes dor\n ON dor.uniqueref = doa.recipe_ref\n\nLEFT JOIN kits k\n ON k.uniqueref = dor.kit_ref\n\nLEFT JOIN care_site cs\n ON cs.uniqueref = i.requesting_caresite_ref\n\nWHERE doa.recipe_ref = {{ $('build_batch_txt').first().json.recipe_ref }}\n AND doa.uniqueref IN (\n {{ JSON.parse($('build_batch_txt').first().json.operations).map(o => o.operation_ref).join(',') }}\n )\n AND doa.status_concept_ref = 29\n AND p.id IS NOT NULL\n\nGROUP BY\n p.id,\n p.name,\n doa.recipe_ref;",
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
1488,
-64
],
"id": "e3ae38c9-f305-445d-8006-f1beef719c69",
"name": "get_operator_mail_and_upload_summary",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fromEmail": "bioinf.notify@gen-era.tech",
"toEmail": "={{ $json.operator_email }}",
"subject": "=NxClinical y\u00fcklemesi tamamland\u0131 - {{ $json.run_ids }}",
"html": "=<!DOCTYPE html>\n<html lang=\"tr\">\n<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"></head>\n<body style=\"margin:0;padding:0;background:#f4f6f8;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:#1f2933;\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background:#f4f6f8;padding:32px 16px;\">\n <tr><td align=\"center\">\n <table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"max-width:600px;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,0.06);\">\n\n <tr>\n <td style=\"padding:24px 32px 20px 32px;border-bottom:1px solid #e4e7eb;\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td style=\"vertical-align:middle;\">\n <img src=\"data:image/gif;base64,R0lGODdhqgA5APcAAAAAABkDAAwMDBMTEwAXIRcZHRsbGyQkJCwuMC4uLjQ0NDg3Njk4M0I8MEQ8LT09PTc+QkE+Oy5ASC9ARz1BQ0NDQwBEcyBEUQRHWzxHTxpIWipIVBNKXENKTgFLZi9LWEtLSwBNaQBNckdNUQBOejZOWDpOWBdPZU5QTwBSdABSfVNTUwBUhQBUjRlUbT1UXy5VZyVXbjpXcDxXY0NYYwBZfx5ZdABajABalQBanABaoTRaeldcXwBdgi1ddU1dZF5eXkFfb1ZfZABgmjBgeQFhhwBikwBiq11iZQBjjx9jhEVjdFNjbGNjY0xkcgBlp0FlehNmlyZmlD1mfltmbGJmaTNnhDhngVhncE9odVpocC5pizxpg0VpflRpdghqmBJqlyNqkmdqbABrpDNrjEtrfWprawBsnkRshSVtmC1tkjBtkTttjB5unShumENuiRRvoT9wjwRxrA1xphdxpC5xnDdxlgBytA1yqxxypTNynDpylWByexJzrSFzpHNzcy10pB51sSR1qz51nSx3rE14mVl4jhl5uid5tzt5rUJ5pGR6iHF6gHx8fGKAlYKCgmOEoX2FiV2Is2WKrG6Lo3OLnnyMlo2NjYOOlHyPn42QkX2UqpSUlJeYl4ObtJubm5Scooyer5Wiq5uipqOjo5ems5qqu6qqqqerrZ2uw6WxvKuytq21vLW1tau7zLG7xru7u6++0bO/zbbBz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Hbw6RO87EfdzQCL/jcjCnKtcgBjyABFUwApqwEIdEdRxndbBFUXohbI/RGwyoUQ+YGfsVeRVgBsJheQLhPVURPqqCCh1gBlVQBTxQaKgka3HTVTelehwhAACghACgGfD3hH/iFzfCFAcwADv0bXrHTH+iAGAnEEwBAGAIAGSXLwRAARDQARa2EMbwC8DQhg+lXnFRensmE9QWDZxwh3cIInq4hx6SPrfwCHd4CcGFE5TUIZewGLdwWaewcdIBC44aCAutwIgCcXouYw10KBs2cVg3s4mc2InNEhAAOw==\" alt=\"Era\" height=\"36\" style=\"display:block;border:0;outline:none;text-decoration:none;height:36px;\">\n </td>\n <td align=\"right\" style=\"vertical-align:middle;\">\n <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAI5klEQVR4nK2Ya2xcxRXH/2dm7r7Xu34ktpMoQEpBqQm0TWgRD0FaaCRaJa1U8wHa5oEMBNpEQaH9QIUdESFUkQIlFMnkgaCiYERbUV5SVdbQ0OIkRAWSEkIgPJIQP/Brd727996ZU821Hdsb23GAI+2uNHtn5jfnNedcwgyljdsk0IjriPT48fv7MukEhYUHzU6qkprogt7x/zMztaBdbqKl/kz2odM9wMz0DCBGQVrzb80Lk/6+YHmFAp2jDBYSwWGABQl44MMe6aPM2MVS/mNlZNG7Y2CgTURmuv3U6bRCwyB6e//uq8Ox6Mq4L1fMidYnKxFDHAoh8IQ5PmjWEDQGUGr8zO3RTw69k3GhnyCixy1XG7Ms1/KMNDQ6cVv3rjnheGJzjZNY/XVVjyQYYS00kWAGk2YjxiNJEsYuSgC7MCovGEeRw1G355/5YvHOG1NLOpqZxSYQg8pOMxVQcyajNi1d6rf2dyxLReI7F4Xn18/W0jgkjc9aGuKReXTKAjzum0CsIAwY3Cu1ets95ve5Q3esTn7rAWYW9kEi4mmBmDkw07a+jqZ5qdmtC6kaae34HhnFsIc6rduVAdr9rJMJXWBPfKRcei/38aOrkotvmgxKlZtpFOacdH3rhajRSoNcM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6lT6/FknEIGErPWks1dgcI4lcMIYQZGB8UuzsypH7nMkNtayqufTYVC8ZZgSEkXdEoxHw4KEXw5Xz5/yADa8IQ30nDFkfV+EaW3wFJSwRsqWhwSJ0jwe9jyU9zy6/9IvkN7uG15r+3dCMgAJhUHN7RtpXNCeHmOUzeL+qp793kXSgjM/shB1ChN6bjbru5TR3aOxQLBttaz+FVsbL/wHA6mM7WukUNwAAAABJRU5ErkJggg==\" alt=\"Tamamland\u0131\" width=\"36\" height=\"36\" style=\"display:inline-block;border:0;outline:none;text-decoration:none;width:36px;height:36px;vertical-align:middle;\">\n </td>\n </tr>\n </table>\n <div style=\"font-size:20px;font-weight:600;margin-top:18px;line-height:1.3;color:#102a43;\">NxClinical Y\u00fcklemesi Tamamland\u0131</div>\n </td>\n </tr>\n\n <tr>\n <td style=\"padding:26px 32px 4px 32px;\">\n <p style=\"margin:0 0 14px 0;font-size:15px;line-height:1.55;\">Merhaba {{ $json.operator_name }},</p>\n <p style=\"margin:0 0 20px 0;font-size:15px;line-height:1.55;\">\n Ba\u015flatm\u0131\u015f oldu\u011funuz NxClinical y\u00fcklemesi ba\u015far\u0131yla tamamland\u0131. Detaylar a\u015fa\u011f\u0131dad\u0131r.\n </p>\n </td>\n </tr>\n\n <tr>\n <td style=\"padding:0 32px 4px 32px;\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:1px solid #e4e7eb;border-radius:8px;border-collapse:separate;border-spacing:0;\">\n <tr>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:13px;color:#52606d;width:170px;\">Run ID</td>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">{{ $json.run_ids }}</td>\n </tr>\n <tr>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:13px;color:#52606d;\">Numune Sahibi</td>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">{{ $json.sample_owners }}</td>\n </tr>\n <tr>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:13px;color:#52606d;\">Hesap (Account ID)</td>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">{{ $json.account_id }}</td>\n </tr>\n <tr>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:13px;color:#52606d;\">Kit</td>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">{{ $json.kit_names }}</td>\n </tr>\n <tr>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:13px;color:#52606d;\">Pipeline</td>\n <td style=\"padding:12px 16px;border-bottom:1px solid #e4e7eb;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">{{ $json.pipeline_name || '-' }}</td>\n </tr>\n <tr>\n <td style=\"padding:12px 16px;font-size:13px;color:#52606d;\">Y\u00fcklenen \u00f6rnek say\u0131s\u0131</td>\n <td style=\"padding:12px 16px;font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\"><strong>{{ $json.total_data_operations }}</strong></td>\n </tr>\n </table>\n </td>\n </tr>\n\n <tr>\n <td style=\"padding:24px 32px 4px 32px;\">\n <div style=\"font-size:12px;color:#52606d;margin-bottom:10px;text-transform:uppercase;letter-spacing:0.7px;font-weight:600;\">Y\u00fcklenen \u00d6rnekler</div>\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:1px solid #e4e7eb;border-radius:8px;border-collapse:separate;border-spacing:0;background:#fafbfc;\">\n {{ ($json.sample_ids || '').split(', ').filter(Boolean).map((s, i, arr) => `<tr><td style=\"padding:10px 16px;${i < arr.length - 1 ? 'border-bottom:1px solid #e4e7eb;' : ''}font-size:13px;color:#7b8794;width:36px;\">${String(i+1).padStart(2,'0')}</td><td style=\"padding:10px 16px;${i < arr.length - 1 ? 'border-bottom:1px solid #e4e7eb;' : ''}font-size:14px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;color:#102a43;\">${s}</td></tr>`).join('') }}\n </table>\n </td>\n </tr>\n\n <tr>\n <td style=\"padding:24px 32px 28px 32px;\">\n <p style=\"margin:0;font-size:13px;color:#7b8794;line-height:1.55;\">\n Bu, otomatik bir bildirimdir; l\u00fctfen bu e-postaya yan\u0131t vermeyiniz. Sorular\u0131n\u0131z i\u00e7in\n <a href=\"mailto:can.holyavkin@gen-era.com.tr\" style=\"color:#0f766e;text-decoration:none;font-weight:500;\">hande.beklen@gen-era.com.tr</a>\n adresine e-posta atabilirsiniz.\n </p>\n </td>\n </tr>\n\n <tr>\n <td style=\"background:#f4f6f8;padding:14px 32px;text-align:center;font-size:11px;color:#9aa5b1;letter-spacing:0.4px;\">\n Gen-Era Diagnostik \u00b7 Biyoinformatik \u00c7\u00f6z\u00fcmler\n </td>\n </tr>\n </table>\n </td></tr>\n </table>\n</body>\n</html>",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
1696,
-64
],
"id": "abb3b239-a605-49b1-a513-c3a9becc6e84",
"name": "Send upload completed email",
"credentials": {
"smtp": {
"name": "<your credential>"
}
}
}
],
"connections": {
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "get_upload_operations",
"type": "main",
"index": 0
}
]
]
},
"get_upload_operations": {
"main": [
[
{
"node": "group_by_recipe",
"type": "main",
"index": 0
}
]
]
},
"group_by_recipe": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"get_idats": {
"main": [
[
{
"node": "build_batch_txt",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "get_completed_operations",
"type": "main",
"index": 0
}
],
[
{
"node": "get_idats",
"type": "main",
"index": 0
}
]
]
},
"build_batch_txt": {
"main": [
[
{
"node": "write_batch_file",
"type": "main",
"index": 0
}
]
]
},
"write_batch_file": {
"main": [
[
{
"node": "run_nxclinical",
"type": "main",
"index": 0
}
]
]
},
"run_nxclinical": {
"main": [
[
{
"node": "update_operations_completed",
"type": "main",
"index": 0
}
]
]
},
"update_operations_completed": {
"main": [
[
{
"node": "get_operator_mail_and_upload_summary",
"type": "main",
"index": 0
}
]
]
},
"delete_batch_file": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"get_completed_operations": {
"main": [
[
{
"node": "build_email_content",
"type": "main",
"index": 0
}
]
]
},
"build_email_content": {
"main": [
[
{
"node": "Send email",
"type": "main",
"index": 0
}
]
]
},
"get_operator_mail_and_upload_summary": {
"main": [
[
{
"node": "Send upload completed email",
"type": "main",
"index": 0
}
]
]
},
"Send upload completed email": {
"main": [
[
{
"node": "delete_batch_file",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"availableInMCP": false
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "9eb40ddc-1cf9-4927-beed-c913673d1aa0",
"activeVersionId": null,
"triggerCount": 0,
"shared": [
{
"updatedAt": "2026-06-01T08:05:32.736Z",
"createdAt": "2026-06-01T08:05:32.736Z",
"role": "workflow:owner",
"workflowId": "9z4hRpQRHcHn1c2K",
"projectId": "wmZSbmn0RiQYcSpN"
}
],
"activeVersion": null,
"tags": [],
"commitDate": "12-07-2026/0:00",
"fileName": "Nxclinical_uploder.json"
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
postgressmtp
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Nxclinical_uploder. Uses executeWorkflowTrigger, executeCommand, postgres, emailSend. Event-driven trigger; 15 nodes.
Source: https://github.com/gen-era/N8N-backup/blob/45bc1509722def960f53853a786d0b1966d51ff6/Nxclinical_uploder.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Log errors and avoid sending too many emails. Uses errorTrigger, postgres, stickyNote, emailSend. Event-driven trigger; 16 nodes.
Most of the time, it’s necessary to log all errors that occur. However, in some cases, a scheduled task or service consuming excessive resources might trigger a surge of errors.
Error Handling System with PostgreSQL Logging and Rate-Limited Notifications. Uses errorTrigger, postgres, emailSend, pushover. Event-driven trigger; 16 nodes.
Nxclinical_uploder. Uses postgres, executeCommand, emailSend. Event-driven trigger; 15 nodes.
Nxclinical_uploder. Uses postgres, executeCommand, emailSend. Event-driven trigger; 15 nodes.