Email Notifications from Forms
I am working on a site migrating from K12 where our client has a number of forms configured that send both autoresponders and email notifications. Within the XbyK interface I can see the option for sending autoresponders but no ability to send email notifications.
A couple of solutions I looked into were:
- Whether it is possible to create custom automation steps that I can then use to create a new type of step for sending an email to a set email address. This is maybe the preferred solution looking at the way XbyK is heading but based on what I can see, the automation steps are essentially hard coded.
- Using a custom after insert event to manually trigger an email. This will work but in my opinion is the least desirable approach. I can do things to expose the configuration of this to the form interface, but I don't like that its inconsistent with the autoresponder format.
Any insights into whether I have missed something or if there is a preferred strategy from Kentico.
Answers
I believe the most practical solution is to use a 'Custom Form Autoresponder Email.' You can find more details in the official documentation.
Additionally, I’ve written a comprehensive article on my blog about how to implement notification emails using custom autoresponder emails.
Thanks for the response @milanlund. As a solution I don't love it as it requires that I select custom form autoresponder email, in addition to setting an automation flow in order to send both an autoresponder and email notification. Furthermore, while there are workarounds by using content items for setting the data of the admin notifications, as shown in your blog post, it creates yet another area of configuration for email notifications outside of the email channel and the form.
In most cases I can see this solution working, but for the sake of future planning, I would like to hear if @seangwright has any other opinions around this.
Regardless of the above, the particular solution I am working on also has a requirement for form data to be sent back in both the email notification and autoresponder so the automation step won't be suitable. In this case I think I may just need to bake something custom for this project.
Fair enough. I still think it’s possible to extend the suggested solution to send both autoresponder and notification emails. While creating content items for settings feels somewhat like a workaround, it was the best approach I could devise based on my client’s requirements and XbyK’s capabilities at the time (Q2 2024). Another option for settings would be to create a custom module, although this would still sit outside the form configuration. Let’s see if Sean shares any future product plans or a more streamlined solution.
You don't have to use the custom autoresponder to achieve what you want. Take a look at the Kentico Community Portal which has this functionality built in.
When a visitor submits a form, the normal autoresponder is sent back to them. That autoresponder is designed and managed in the Email channel.
The internal autoresponder (notification) recipient is selected from a list. This is a single user selection in the Community Portal but you could adapt it to multiple user selection if you needed. This is done through an extension to the administration UI.
The application then hooks into the underlying automation system and manually sends an "automation" email to the internal recipient when the form is submitted on the website. This can use some logic to determine who to send an email to for each specific form.
All that said... notifications for administration users is coming up quick on the roadmap which includes assigning internal notification recipients for form submissions. So, if you don't need the functionality today you can save some custom development by waiting for us to ship the feature.
Also, just a note about "custom settings" - we have a full end-to-end guide covering how to design channel-specific settings for your solution.
To answer this question, you have to login first.