Send instance content to submitter's email


(dmtk41) #1

Dear all,
I have survey with some questions are important to the submitters. They wants to have a copy of form instance that they have just submitted.
Instances are kept in device so it's OK if 1 submitter use 1 device.
But it becomes more complex if many submitters use the same device to do survey. In this case, whenever start a survey, submitter need to define their identification( username, email...) in advance in form metadata. In my case, hospital collect data from their patient as a submitter using hospital's device. Then data is sent to submitter via their email manually.
I'm thinking of adding a last question to the survey to get submitter email address and send instance content to them automatically when finalize. I'm not a coder so I don't know how difficult to make this feature.
So pls give your idea on this feature or any more simple way for submitter to having a instance copy.


(Yaw Anokwa) #2

See Sending a text message (SMS) or email from a form in Collect for a sample form that lets you send an email with whatever variables you'd like. We also have this documented at https://docs.opendatakit.org/launch-apps-from-collect/#specifying-a-uri-as-intent-data. Does that solve your problem?


(dmtk41) #3

Thank you Yaw.
So glad knowing that the solution has been already there. I'll try it now.


(dmtk41) #4

Hi @yanokwa
I've just try the feature "Specifying a URI as intent data". Basically, it's possible to mail the instance content to submitter. However,
1/ It's quite difficult to generate a long good looking email body. Maybe it's already possible but I don't know how to send the instance content as an attachment of .pdf or .csv or .zip. If you have some time, pls kindly give me a sample form.
2/ The behavior (when the submitter inputs his email address, then launch external app and send email to himself the content he has just input to the form) is somehow strange. I prefer the submitter just inputs his email address only, and the sending action happen behind screen when he finalize the form.


(Yaw Anokwa) #5

I agree that this could be better and we welcome contributions here.

Can you tell me the underlying reason why submitters need a copy of the instance?


(dmtk41) #6

Thank you @yanokwa.
For example we have local hospital or medical station where people register for a vaccination or apply for a health insurance plan. They need to put in the form their personal information and state their current health status. The form finally is signed and kept by both submitter( 1 copy) and hospital officer ( 1 copy).