Opt out for Workflow Emails

Is it possible to add an opt-out link for emails that are sent via workflow?

To my knowledge there is no such functionality.

However you could add a custom field to contacts (and accounts or other modules) called: opt_out_from_workflow_emails and add a condition of the workflow so that emails are only sent to those who haven’t opted out.

This method has the disadvantage of being applied to all your workflows that check for the optout but, if you would like to do the same on a per-workflow basis, you could try a different solution:
Just create a custom module with the information and with relationships to workflows and to the modules that you wish to exclude. This does not require coding but it is a little more complicated to achieve and test but I don’t see why it shouldn’t work.

If you want to apply it to single email addresses or domains or other filtering methods you may still find a solution but it will be obviously more complicated. But not impossible.

1 Like

Hi amariussi,

That makes sense. I’m just not sure how I would create an opt-out link that I can include in the email template. Any suggestions?


In theory you could create a campaign and associate to a it a target list.

In parallel you would create an email template for that campaign and launch the email campaign selecting your target list.

With the workflow you should be able to add elements to the target list of that campaign and, if necessary, add them to the email queue.

Once the element is in the queue it should be sent.

With respect to the opt-out link: normally all emails sent via campaign have an opt-out link which is generated by the system unless you have added one to the email template.

All this is theoretical because I have never tried it but I don’t see why it shouldn’t be possible.

I went into the workflow module and you can add relationships or add records to the email queue. However, unless someone who has done something similar already suggests how to write the workflow, you would have to experiment a bit,

Maybe, to complete some potentially missing parts you may have to write a custom scheduler or write some code.

1 Like