Send 1 Email with multiple Files from ssh node

Describe the issue/error/question

I’m trying to send by email 3 attachments from ssh node wich I download some files. Following other posts here in the community the end of my function node didn’t move forward my binary files. Consequently in the email node result is none file.

Second Issue is that my email node send the email and I didn’t receive the emails, I tried with a 3 other emails as a destinatary but I didn’t receive.

I need to make any kind of extra config to send emails?

What is the error message (if any)?

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • ** 0.188.0**
  • ** (default: SQLite):**
  • default, main:
  • Docker:

Hi @rodrigoscdc, the Function code you’re using expects your binary data inside a property named data, but in your ssh node you’re setting the binary property to {{$json.file.split(".")[0]}}.

Could you update the property name in your SSH node like so?

Afterwards, your node would return binary items:

Second Issue is that my email node send the email and I didn’t receive the emails, I tried with a 3 other emails as a destinatary but I didn’t receive.

Are you seeing the email in the “Sent”, “Outbox”, etc. folder of [email protected]? If not, is there any error explaining the bounce? If not, could you check with your email provider what might have happened to these emails handed over to their SMTP server? They might not like empty message bodies or something like this.

The node in general seems fine to me and is working when testing this with my own email accounts:


Thanks MutedJam it works, one thing I think is my smtp email that is with problem, so I create an account on mailjet to send my email and using attatchments. But if I run my workflow on cron trigger always give me an error, including if I am on test mode when I hit execute workflow, the only way that I need to do to not give error is executing all nodes before http node that will make request to mailjet, so after that I can hit execute node, so the workflow will not run error.

My version of n8n is 0.192.2 on docker

But if I run my workflow on cron trigger always give me an error, including if I am on test mode when I hit execute workflow

Now that sounds very unexpected to me - which error exactly are you seeing?

I got this error

Inside the node nothing show, just the error message bellow.

Ohhh, any chance you can take a look at the server logs? I hope they contain more information on the error and a stack trace.

@MutedJam here is the log message

{"level":"debug","message":"Start processing node \"Function1\"","metadata":{"file":"WorkflowExecute.js","node":"Function1","timestamp":"2022-09-13T13:39:57.540Z","workflowId":"130"}}
{"level":"debug","message":"Running node \"Function1\" started","metadata":{"file":"WorkflowExecute.js","node":"Function1","timestamp":"2022-09-13T13:39:57.541Z","workflowId":"130"}}
{"level":"debug","message":"Running node \"Function1\" finished successfully","metadata":{"file":"WorkflowExecute.js","node":"Function1","timestamp":"2022-09-13T13:39:57.549Z","workflowId":"130"}}
{"level":"debug","message":"Start processing node \"HTTP Request\"","metadata":{"file":"WorkflowExecute.js","node":"HTTP Request","timestamp":"2022-09-13T13:39:57.550Z","workflowId":"130"}}
{"level":"debug","message":"Running node \"HTTP Request\" started","metadata":{"file":"WorkflowExecute.js","node":"HTTP Request","timestamp":"2022-09-13T13:39:57.550Z","workflowId":"130"}}
{"level":"debug","message":"Proxying request to axios","metadata":{"file":"NodeExecuteFunctions.js","function":"proxyRequestToAxios","timestamp":"2022-09-13T13:39:57.563Z"}}
{"level":"debug","message":"Subprocess for execution ID 68957 finished with error code 1.","metadata":{"executionId":"68957","file":"WorkflowRunner.js","timestamp":"2022-09-13T13:39:57.700Z"}}
{"level":"debug","message":"Executing hook (hookFunctionsSave)","metadata":{"executionId":"68957","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","timestamp":"2022-09-13T13:39:57.701Z","workflowId":"130"}}
{"level":"debug","message":"Executing hook (hookFunctionsPush)","metadata":{"executionId":"68957","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","sessionId":"gr8l69x5uui","timestamp":"2022-09-13T13:39:57.707Z","workflowId":"130"}}
{"level":"debug","message":"Save execution progress to database for execution ID 68957 ","metadata":{"executionId":"68957","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","timestamp":"2022-09-13T13:39:57.708Z","workflowId":"130"}}
{"level":"debug","message":"Send data of type \"executionFinished\" to editor-UI","metadata":{"dataType":"executionFinished","file":"Push.js","function":"send","sessionId":"gr8l69x5uui","timestamp":"2022-09-13T13:39:57.708Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-09-13T13:40:46.779Z"}}

Thanks so much for confirming @rodrigoscdc. Seeing there’s no error in there I shall add this problem to our internal bug tracker for a closer look by the engineering team. Please accept my sincere apologies for the trouble this causes :frowning:

Thanks so much @MutedJam

1 Like

Hey @rodrigoscdc,

I have just started to look into this one and I have not been able to reproduce the issue. Would you be able to share the env options you have set for your docker image with any important values like hostnames / passwords replaced with a dummy value.

Out of interest what SSH server and version are you connecting to?

Hello @Jon sorry for delay,

this is my docker file

version: "3"

    image: "traefik"
    restart: always
      - "--api=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "${SSL_EMAIL}"
      - ""
      - "--providers.file.filename=/traefik_conf.yaml"
      - "443:443"
      - ${DATA_FOLDER}/letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik_conf.yaml:/traefik_conf.yaml

    image: n8nio/n8n:0.195.4
    restart: always
      - ""
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
      - traefik.backend.buffering.maxRequestBodyBytes=128000000
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - N8N_METRICS
      - N8N_LOG_LEVEL
      - N8N_LOG_OUTPUT
      - N8N_SMTP_SSL=false 
      - /var/run/docker.sock:/var/run/docker.sock
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
      - /home/border/n8n-local-files:/files
      - /home/border/node_modules/sugar-date:/usr/local/lib/node_modules/sugar-date
      - /home/border/node_modules/awesome-phonenumber:/usr/local/lib/node_modules/awesome-phonenumber
      - /home/border/node_modules/sugar-core:/usr/local/lib/node_modules/sugar-core
      - /home/border/node_modules/request-promise-native:/usr/local/lib/node_modules/request-promise-native

this is my .env file

# Telemetry Disable


#LOG mode

#Log Path

# Folder where data should be saved

# The top level domain to serve from

# The subdomain to serve from

# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in:

# The user name to use for autentication - IMPORTANT ALWAYS CHANGE!

# The password to use for autentication - IMPORTANT ALWAYS CHANGE!

# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used

# The email address to use for the SSL certificate creation
[email protected]

# Allow external NPM modules

# Allow usage of all builtin modules

# Change Prefix of path metrics n8n

# Enable metrics from n8n

# Enable Data Prune

# Enable Prune Historical older dan 90 days (2160h)

Perfect there is nothing crazy in there, With the SSH Server do you know what server and SSH version it is? After testing and chatting to @MutedJam before he went on holiday I have a feeling it might be a Windows server running OpenSSH 8 but it is worth checking before I go too far down that route.

@Jon this is the version of ssh debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_8.9 debug1: match: OpenSSH_for_Windows_8.9 pat OpenSSH* compat 0x04000000

@rodrigoscdc that is perfect and fits my theory, It is also annoying as there isn’t a quick fix. As a temporary solution can you try using the FTP node and set it to SFTP, It will do the same thing but from some quick tests you won’t hit the same issue.

@Jon you’re right it works perfectly using ftp node.

Thanks a lot.

1 Like

Hi @rodrigoscdc,

That is perfect and gets you up and running while I work on a fix.