Send Email via Sub-Workflow

Describe the problem/error/question

Like i described in the title id like to send via triggered sub workflow an email

What is the error message (if any)?

No recipients defined

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.88.0
  • Database (Postgres):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker):
  • Ubuntu 22.04:
1 Like

Hi @Greyhound,

You can use a sub workflow and pass only the email address to it. have the sub workflow accept the email address as the query.

Here’s an example.

Best,

Robert

Hey Robert, thanks a lot for your fast answer.

i missed to explain the background. i have an seatable base with some company date from threir employes.

id like to interact with an ai model to ask questions like: what is the mail address of employe “Emma”

– the AI should check the seatable base and give back the results

this parts works fine

in the second part id like to interact with the AI and tell him, send an email to this employe with the content “blabla”

this part doesnt work at the moment.

iam struggling with the logic to build that worklfow.

do u have any idea how the workflow should be designed?

thanks a lot in advice!
Kai

1 Like

Hi @Greyhound,

the best way to design this is with separate tools that each do one part of the task.

add a task to your agent that takes in an email address only, and has an email send step with something like google or outlook.

Your system prompt should say something like this. once you have an email address send it to the “Send Email” tool with no other other text.

That should send the email for you.

Best,

Robert

can you provide an example workflow pls, iam relativ new to n8n :confused:

1 Like

hi @Greyhound ,

Here’s an example with two tools. The send email uses an information extractor node to turn the information into json.

thanks a lot, i understood the logic now behind the workflow. will try it this way…

1 Like

@Greyhound
Great! If that solves your issue, please mark the answer as the solution so others can benifit from it.

sure when its running, at the moment it doesnt but iam working on it (to understand the logic behind)

1 Like