forms
forms copied to clipboard
Confirmation mail for respondents
Describe the solution you'd like If a user fills out a form, they often expect to receive a confirmation mail. E.g. after filling out a job application form, you often receive an automated mail saying "Thanks for your application, here is an overview of the data you submitted: ....", possibly including extra information about the further process. It would be nice to be able to configure such an automated mail in Nextcloud Forms. Building blocks for the mail body would be:
- Overview of submitted data
- Custom text
- Access to form field data in the custom text, e.g. "Hello {name}, thank you for contacting ..."
This requires including a special Email-field in the form for responding (depends on #177) and maybe an optional checkbox "I want to receive a confirmation mail"
Possible implementation variants
a) Standalone Define a mail body template and subject per each form, select one of the mail accounts configured in "Mail" as sender (alternatively provide SMTP data) per each form
b) Using Nextcloud Flow I didn't use Nextcloud Flow before, but if it is what I think it is, I could imagine it brings all the necessary building blocks for this, if integrated into forms. I could imagine defining a flow as follows: when new form answer arrives, use the message body defined in "template.md", replace "{name}" placeholder by value from field "{name}" and "{data}" placeholder by the data overview. Send email to the address from field {email}, using the account "[email protected]" from the "Mail" app.
c) Using External Scripts Provide a REST-API/Webhooks/etc. so I can have an external 10 lines Python script to take care of it. Maybe this is already possible? (waiting for #451 to answer this)
Hey! Thanks for your suggestion! That is interesting! @jancborchardt what do you think?
Sure, but let’s keep it dead-simple:
At the end of every form, just before the submit button, there could be a checkbox:
- [ ] Get a copy of the responses via mail to:
[ [email protected] ]
And that’s all. It would be unchecked by default, and if it’s checked you can fill in your email address. If the person filling it is a Nextcloud user, their email from the profile can be prefilled here.
(Nothing the admin or form creator has to decide about this since it’s a feature purely for user convenience. It will use the standard Nextcloud mail template and we’re not going into the rabbit hole of customization here. ;))
Sure, but let’s keep it dead-simple:
At the end of every form, just before the submit button, there could be a checkbox:
- [ ] Get a copy of the responses via mail to:
[ [email protected] ]
And that’s all. It would be unchecked by default, and if it’s checked you can fill in your email address. If the person filling it is a Nextcloud user, their email from the profile can be prefilled here.
(Nothing the admin or form creator has to decide about this since it’s a feature purely for user convenience. It will use the standard Nextcloud mail template and we’re not going into the rabbit hole of customization here. ;))
It also would be nice to let the admin choose the default value here.
Hello around, just a quick message to wake up this topic. any news about its implementation maybe? :)
Could it be done by providing a few hooks, at least webhooks_forms_submission_inserted
, webhooks_forms_form_created
and webhooks_forms_form_updated
?
webhooks_forms_submission_inserted
could enable two things:
- using Flow Notifications, a user/group of users could receive a notification an answer has been submitted
- using Webhook flow with the provided Answer data, the email notification can be delegated to a service which deals well with this situation, with a transactional email service like Sendgrid or something like that.
webhooks_forms_form_created
and webhooks_forms_form_updated
could help trigger a statically generated website rebuild (like pinging GitLab CI, GitHub Actions or a Netlify deploy).
It could be a good start to enable workflows around Forms, without bundling too much logic right into the module.
I am happy about the suggestion to prioritise the groundwork needed to enable notifications, by implementing the neccessary hooks first and focussing on (conventionally) standardised Webhooks to third party services. Could this eventually escalate into its own issue?
Then here we can focus on the mail sending part within Nextcloud, which would be due after the prior, and keep it open independently.
I would like to see this feature in future as well :)
I am currious if there are any updates if this is something to expect soon. Would be a great feature.
Sure, but let’s keep it dead-simple:
At the end of every form, just before the submit button, there could be a checkbox:
- [ ] Get a copy of the responses via mail to:
[ [email protected] ]
And that’s all. It would be unchecked by default, and if it’s checked you can fill in your email address. If the person filling it is a Nextcloud user, their email from the profile can be prefilled here.
(Nothing the admin or form creator has to decide about this since it’s a feature purely for user convenience. It will use the standard Nextcloud mail template and we’re not going into the rabbit hole of customization here. ;))
Sure, but let’s keep it dead-simple:
At the end of every form, just before the submit button, there could be a checkbox:
- [ ] Get a copy of the responses via mail to:
[ [email protected] ]
And that’s all. It would be unchecked by default, and if it’s checked you can fill in your email address. If the person filling it is a Nextcloud user, their email from the profile can be prefilled here.
(Nothing the admin or form creator has to decide about this since it’s a feature purely for user convenience. It will use the standard Nextcloud mail template and we’re not going into the rabbit hole of customization here. ;))
@jancborchardt Would it be possible, to activate respondents notification in the form settings and after that you have to select one of the form fields (input field, or input type email?), you added, where the notification has to sent to. Maybe a new form field from type "email input" is required, to validate the recipient address, but i think it would be great.
So you could activate the notification for a form and when activating it, you require an form field from type e-mail, which is configured earlier.
YES! this is exactly what we need for our use case scenario! Please add in 4.0 :)
I would also appreciate this feature very much, since we are also often getting asked by respondents whether their submission was really successful.
It's a little sad to see that one of the by far most wanted feature requests is scheduled for "maybe someday". Maybe the first step could be a simple confirmation email without any custom text and sent from the nextcloud instance's default noreply email address, something like: Subject: "Your submission: {formTitle}" Text: "Dear respondent, your submission for the form {formTitle} was successful. Your answers: {questionsAndAnswers}"
I think that this should be much easier to implement as a first step and would already meet the requirements of many.
whether their submission was really successful.
They already get a submission message in the browser after clicking on the submit button. Which, btw, you can customize for some time now.
So why should they be more satisfied with an e-mail? 🙈
But yes, "maybe someday" just because no-one started coding this feature by now. If you can help us here, a PR would be highly appreciated!
They already get a submission message in the browser after clicking on the submit button.
Yes, that's true. Nevertheless, many seem to want an email to be sure and to have a persistent proof of their form submission. An email also allows the respondents to check their answers at a later moment.
Besides, there is also some layout issue with the (custom) submission message making it sometimes only partially visible on mobile screens. I'll open an issue with an example and screenshots when I have time.
That's understandable, I consider looking into this myself, we'll see :)
For developer it seems to be a solved problem with some user notification when sending the form. but we get the same feedback from our users that the wish a email notification. so it would be great if anyone could implement something like the above options <3
Yes I understand that, but this of course also opens the possibility for spammers. You can just enter any address you want...
Well, that's a risk every public newsletter or account registration has. The form creator can decide whether this poses a real risk in his use case. But I agree, it might be a good idea to inform the form creator about the risk when enabling the email confirmations.