Try ERPNext Buy Support Partners Foundation

Workflow Email Notifications

I’m fairly new to ERPNext. I’m playing around with workflows.

I have done a simple workflow for Material Request with Draft, Pending, Approved, Rejected states.

Once a user has created and submitted a Material request, it changes to Pending for approval/rejection. I set “sent email alerts” and I’m expecting Material Manager to receive emails when a material request has been submitted, but no emails are being sent.

What am I missing?

Hi, tefoby.
I think you should try fill your email account first (maybe).
Actually i’ve never use that way :joy: but i do actually use some other frappe features.
Go see doctype named Notification and then change the send alert on the field Value Change then pick workflow_state or field that u defined in Workflow .

Thank you.

That’s a better and more flexible option

Yes but this method does not include the workflow action in the mail. I’ve asked for supposed on how to include workflow actions in custom notifications but no one seems to want to help and unfortunately i’m not a programmer and so i can’t understand the underlying code for uncluding workflow actions in mail even though i have read the code several times.

I know the next response will be “pay a developer to figure it out for you” so i’m just going to end my comment here… walks away :walking_man:

@flexy2ky Well yeah maybe this method cannot include “workflow action” in the notification/email directly, but surprisingly you can design to make it more good than just workflow action.
If your workflow action do Approve, maybe you can setting the message to
Hey please Approve this document {{doc.name}} bla bla

Well my clue is:
1st
Read it on the documentation [Setting up an Alert]
(https://docs.erpnext.com/docs/user/manual/en/setting-up/notifications#1-setting-up-an-alert)
They there for a reason :slight_smile:

2nd


3rd
4th {{doc.something}} something can be replaced by some value field on that doc

@antzforwork Agreed. But it means approvers have to login, search for the action button which can be pesky on mobile (as shown in the image below) and select an option which could be cumbersome and can lead to mistakes as the actions are tiny on some devices.


Compare that the receiving this mail with the PO attached as a pdf file:

Click on the desired workflow action which launches a browser.

And then just click to confirm.

You will agree with me that the second process is much quicker, convenient and user-friendly. And this is especially so for field managers who want a quick process without the hassles of sign in and possible mistake of selecting reject workflow action instead of approve.

Hi Flexy2ky,

I was also hoping to use the workflow action in the email as well. I thought my original approach would do that automatically.

This is what I wanted to achieve:
https://docs.erpnext.com/docs/user/manual/en/setting-up/workflow-actions

Same thing i wanted to achieve.