0

So I've been using EE for some years but I've never created an add-on before and I was hoping for some guidance on how to approach it and whether it should be an extension or a module.

Requirements:

  1. When a channel entry is created or edited I need to trigger an email send. This email send will be using the Mandrill API ( a service of Mailchimp). Their API includes a PHP codebase option or Javascript / JSON call.

  2. If an entry is created I need to trigger a specific email template and pass in some channel entry data.

  3. If an entry has it's status changed I need to trigger one of two templates - approved or denied, again passing in dynamic data.

  4. A nice to have would also be the ability to trigger an email on member registration but this is less important right now.

So it seems to me my add-on would need to be aware when an entry was created or modified, and I would need to know what the status of that entry is and then retrieve entry data and trigger the API. It would also be nice to be able to handle any API response such as success / failure.

Can anyone advise me on best approach for this?

Thanks.

1
  • did you ever find a solution for this? I am looking for a solution to send out an email digest weekly that includes entries from the past week. Feb 27, 2018 at 18:59

1 Answer 1

1

I am relatively new to EE, but for our current project, I have already written one Extension and one Module. It is a pretty straight-forward process.

Here is the explanation of how the AddOn types differ:

https://docs.expressionengine.com/latest/add-ons/add_on_types.html

And any information on how to actually develop an AddOn can be found in this collection:

Tools for learning ExpressionEngine addon development

As for your specific question regarding Extension vs Module. I would judge it as follows: if you don't need custom EE tags and manageable settings, you probably don't want to write a Module. It seems much of what you want to achieve are additional actions based on hooks/triggers. Therefore, you probably need to develop an Extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.