Notification Email on Submission: Attaching a text/csv representation of survey answers?

19 views
Skip to first unread message

Johannes Graumann

unread,
Mar 26, 2025, 12:14:01 PMMar 26
to Redcap Open
Hello,

I set up a first multi-section survey sucessfully and have configured it to upon submission write the results into a hidden upload field as a pdf - as variously documented across the web. Also configured is a notification email that makes use of the corresponding pdf as an attachment.

What I am, however, looking for for my downstream workflow is an option to replace that (pdf)format with a blank text file for data exchange. yaml or json would be great, but I'm taking csv as well.

Is such a solution available? How would I achieve this?

Thank you for any pointers.

Joh

Luke Stevens

unread,
Mar 27, 2025, 12:30:04 AMMar 27
to Johannes Graumann, Redcap Open

Hello Joh,

 

  • “replace that (pdf)format with a blank text file for data exchange. yaml or json would be great, but I'm taking csv as well”

It is not clear to me quite what you are envisaging with this, sorry. What does it mean to have a blank text file for data exchange?

 

Regarding YAML, JSON, or CSV, however, would piping data into a text/notes field do what you need? Something like this?

@SETVALUE='{"record_id":"[record-name]","q1":"[q1]","q2":"[q2]"}'

 

You would then implement some process to read that field to obtain the JSON text and put it into a request.

 

HTH,

Luke

 

From: redca...@googlegroups.com <redca...@googlegroups.com> On Behalf Of Johannes Graumann
Sent: Thursday, 27 March 2025 03:14
To: Redcap Open <redca...@googlegroups.com>
Subject: [EXTERNAL][REDCap Open] Notification Email on Submission: Attaching a text/csv representation of survey answers?

 

CAUTION:  External Email. Please be cautious with attachments and clicking links

 

--
You received this message because you are subscribed to the Google Groups "Redcap Open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/redcap_open/37eca227-ba2c-4887-95c4-24f4c352c55cn%40googlegroups.com.



This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.

Johannes Graumann

unread,
Mar 27, 2025, 11:05:07 AMMar 27
to Redcap Open
Thanks, Luke,

On Thursday, March 27, 2025 at 5:30:04 AM UTC+1 Luke Stevens wrote:
...
  • “replace that (pdf)format with a blank text file for data exchange. yaml or json would be great, but I'm taking csv as well”

It is not clear to me quite what you are envisaging with this, sorry. What does it mean to have a blank text file for data exchange?

My use case is that I'm "abusing" a RedCAP instrument as a project submission form for a local core facility. The resulting email goes to multiple people involved in processing (not all of which have the know how to use the API and R or some such to get to the data). It would be preferable to have the data as csv or some such attached to that email.

Regarding YAML, JSON, or CSV, however, would piping data into a text/notes field do what you need? Something like this?

@SETVALUE='{"record_id":"[record-name]","q1":"[q1]","q2":"[q2]"}'

 

You would then implement some process to read that field to obtain the JSON text and put it into a request.

That's indeed an option with the massive caveat that when editing the instrument and changing/adding/removing field names, the routine has to always be adjusted. I was hoping for system/inherent automation just as for the straight forward pdf output...
Is it feasible to within such a @SETVALUE statement iterate automatically over the entire collection of field names?

Thanks, Joh

Peter Macisaac (POP)

unread,
Mar 27, 2025, 4:18:05 PMMar 27
to Johannes Graumann, Redcap Open
Joh

Had a similar use case a number of years ago I think

Can you format the email generated at the submission with both the PDF for clarity and also insert values into a CSV or TSV format
Eg

[first_name],[second_name],[some_other_data], ….etc

At least that string could be processed.

I sense that those receiving the application form will need to do manual work to process the data you provide into whatever format they need to do the next part of the workflow

REDcap is amazing in its capabilities to not only manage data but support project processes and workflow - I dont see this as “abuse”

I aim for projects where everything is stored in REDCap, data and process information and workflow - only one place to look

Hope this helps

Peter MacIsaac













Reply all
Reply to author
Forward
0 new messages