This workflow follows the Emailsend → HTTP Request 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 →
{
"name": "JFCandia_Flujo",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "testwebhook",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-860,
-340
],
"id": "a3fabd24-cd3b-4d2f-b16e-586cbed6226b",
"name": "Webhook"
},
{
"parameters": {
"command": "python \"C:\\Users\\jcandia.SBAD\\Documents\\BallenaAzul\\veterinaria-app\\src\\test_db.py\""
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-800,
20
],
"id": "116bea98-0176-4cae-82a8-2162ca60c069",
"name": "Execute Command"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "xxxxxxxxxxxx",
"leftValue": "={{$json[\"stdout\"]}}",
"rightValue": "OK",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-580,
-380
],
"id": "xxxxxxxxxxxx",
"name": "If"
},
{
"parameters": {
"fromEmail": "candia1978@gmail.com",
"toEmail": "candia1978@gmail.com",
"subject": "\u2705\u2705\u2705Ejecucion Validacion - DTE",
"html": "=\u2705\u2705\u2705 El test autom\u00e1tico de Validacion - DTE se ejecut\u00f3 correctamente.\n<br>Fecha: {{ $now }}\u2705\u2705\u2705",
"options": {
"ccEmail": ""
}
},
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
-340,
100
],
"id": "xxxxxxxx",
"name": "Send Email",
"credentials": {
"smtp": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "9a3e3ef1-fa95-4597-8ee7-c0f782b08ae4",
"name": "log",
"value": "=Fecha: {{ $now }}\nEstado: {{ $json[\"stdout\"].includes('OK') ? 'OK' : 'ERROR' }}\n{{ \n $json[\"stdout\"].includes('OK') \n ? '\\nConsulta ejecutada correctamente.\\n-------------------------------' \n : (\n '\\n\u274c ERROR DETECTADO:\\n' +\n (\n $json[\"stdout\"].split('\\n').find(line => line.startsWith('ERROR:')) \n || \"No se encontr\u00f3 mensaje de error en la salida.\"\n ) +\n (\n $json[\"stdout\"].includes('no such table')\n ? '\\nSoluci\u00f3n: Verifica que la tabla exista en la base de datos y que el nombre est\u00e9 bien escrito.'\n : $json[\"stdout\"].includes('unable to open database file')\n ? '\\nSoluci\u00f3n: Revisa la ruta del archivo y los permisos de acceso.'\n : $json[\"stdout\"].includes('Prueba forzada de error')\n ? '\\nSoluci\u00f3n: El script est\u00e1 configurado para forzar un error. Quita o comenta esa l\u00ednea para probar normalmente.'\n : $json[\"stdout\"].includes('syntax error')\n ? '\\nSoluci\u00f3n: Hay un error de sintaxis en la consulta SQL. Revisa la consulta.'\n : '\\nSoluci\u00f3n: Revisa el mensaje de error y corrige seg\u00fan corresponda.'\n ) +\n '\\n-------------------------------'\n )\n}}",
"type": "string"
}
]
},
"includeOtherFields": "=Fecha: {{ $now }} | Estado: {{ $json[\"stdout\"].includes('OK') ? 'OK' : 'ERROR' }} | Salida: {{ $json[\"stdout\"] }}",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-180,
-360
],
"id": "ff5d0328-3e77-46fc-8f7c-1e876e8344c5",
"name": "Edit Fields"
},
{
"parameters": {
"operation": "write",
"fileName": "C:\\Users\\jcandia.SBAD\\Documents\\BallenaAzul\\veterinaria-app\\src\\resultado.json",
"dataPropertyName": "archivo",
"options": {
"append": true
}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
580,
-80
],
"id": "9e36b79e-ecc4-4ca6-b560-1b4581f7c4e5",
"name": "Read/Write Files from Disk"
},
{
"parameters": {
"jsCode": "const logText = $json.log + \"\\n\";\nconst buffer = Buffer.from(logText, \"utf8\");\nreturn [\n {\n binary: {\n archivo: {\n data: buffer.toString(\"base64\"),\n mimeType: \"text/plain\",\n fileName: \"test_log.txt\"\n }\n }\n }\n];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
180,
-360
],
"id": "952ed602-48bb-4657-8e5e-24b838e7f52d",
"name": "Code"
},
{
"parameters": {
"method": "POST",
"url": "https://api.telegram.org/bot7696471753:AAEe4UsczQcRM0V8uMrxKql5xdjhZQxjtck/sendMessage",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"chat_id\": \"xxxxxxxx\",\n \"text\": \"\ud83d\udce2 Notificaci\u00f3n de prueba exitosa desde n8n Para Validacion DTE\\n\u23f0 {{$now}}\"\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
40,
20
],
"id": "c7ca532b-071f-4e78-8f7b-5eaf62423df4",
"name": "HTTP Request"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Execute Command",
"type": "main",
"index": 0
}
]
]
},
"Execute Command": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Email",
"type": "main",
"index": 0
},
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Send Email": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Read/Write Files from Disk",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "82f8847d-a9e9-40f0-b6dd-bc0ef36b5ed1",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "veknus9q8960Vl3m",
"tags": []
}
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.
smtp
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
JFCandia_Flujo. Uses executeCommand, emailSend, readWriteFile, httpRequest. Webhook trigger; 8 nodes.
Source: https://github.com/JFCandia/Flujo-validacion-DTE/blob/54ec61da6fe9f02c9f957b2cbc78dc9869247bcc/JFCandia_Flujo.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.
Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.
This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t
Track Changes Of Product Prices. Uses htmlExtract, functionItem, httpRequest, writeBinaryFile. Scheduled trigger; 25 nodes.
This workflow automatically tracks changes on specific websites, typically in e-commerce where you want to get information about price changes. Basic knowledge of HTML and JavaScript Execute Command n
Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.