How to send an email with camunda cloud?

I want to send an email using a service task in camunda cloud but I don’t know how to do it.

The sample diagram in camunda cloud is a process that sends an email.

The task “Enter message” is a form to fill, and the “Send Email” service task only has a type “email” and the number of retries.
The problem, is that they don’t explain how to do it.
In my diagram, I did the same, but it doesn’t work.

What can I do ?

You have to write worker, that implements sending emails.

Thank you for your answer.

I ran Zeebe on docker, created a Java project and added the maven depency “zeebe-client-java”, but now, I am lost

Could you help me for the rest please ? I am new to this.

I looked this to send an email up but I dont really understand it.

I am not java programmer, I use nodejs and nodemailer. It takes me half of day to make mail working

See here for creating a worker in general (including in Java): GitHub - camunda-cloud/camunda-cloud-get-started: Camunda Cloud Get Started Projects

And here for ideas on an email worker: Transactional Email Microservice with Zeebe and NestJS - Camunda

2 Likes

Thank you very much, I will try this

So I tried what you suggested me, and I think I am almost there.
The only thing is that, in this example of an email worker, I don’t know if it’s supposed to really send an email or not.
When reading the code, I don’t seem to find the part where it does, but I am not sure.

Could you help me please ?

The example code shows the integration. The actual business logic (in this case sending an email) you need to write in there. The example shows you how to create a worker, write the callback handler function, get variables from the payload, and complete the job.

1 Like