Recued
Menu
← Back to recipes

Capture DeepTutor answer

by recued-core v8 39 views

Use “Capture DeepTutor answer” in Recued. It runs on its own when a student emails their answers back, and files that reply as a pending answer so the grading workflow can score it on the next run.

Complete workflow

DeepTutor Records 9 pinned recipes

Use DeepTutor Records in Recued for tutoring, student and assignment record-keeping. It stores students, assessments, answers, artifacts and scorecards, and includes 7 ready-to-run workflows that enrol students, send assessments, capture answers and grade them. Paid students arrive through any Seller provider lane (Stripe, Paddle, Lemon Squeezy). It needs the DeepTutor pack for question generation. It runs locally on your machine. Actions that change data use Recued's approval controls.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Capture DeepTutor answer
This recipe Background automation

Use “Capture DeepTutor answer” in Recued. It runs on its own when a student emails their answers back, and files that reply as a pending answer so the grading workflow can score it on the next run.

pack:deeptutor-daily-masterydeeptutorstudentanswer
by recued-core pinned v8

Use “Enroll free DeepTutor student” in Recued. Exact-form enrollment template for a free class.

pack:deeptutor-daily-masteryform-response-templatestudentenrollment
by recued-core pinned v7

Use “Register paid DeepTutor student” in Recued. It turns one complete Seller order into a class roster record.

pack:deeptutor-daily-masterystudentenrollmentpaid
by recued-core pinned v7

Use “Send DeepTutor assignment or exam” in Recued. Scheduled class dish. It uses the connections and settings you choose when you run it.

pack:deeptutor-daily-masterydeeptutorassignmentexam
by recued-core pinned v10

Use “Grade DeepTutor answers” in Recued. Scheduled class batch. It uses the connections and settings you choose when you run it.

pack:deeptutor-daily-masterydeeptutorgradingassignment
by recued-core pinned v10

Use “List DeepTutor assignments and exams” in Recued. It provides a read-only class index over the DeepTutor pack's own assessment records.

pack:deeptutor-daily-masterydeeptutorassignmentexam
by recued-core pinned v4
Show all 9 recipes

Use “View DeepTutor assessment” in Recued. It provides a read-only exact detail for one DeepTutor assignment or exam.

pack:deeptutor-daily-masterydeeptutorassignmentexam
by recued-core pinned v3

Use “View DeepTutor scorecards” in Recued. Lists the derived assignment and exam scorecards the DeepTutor pack keeps in its own records. Supply one Seller customer id for that student's rows, or leave it blank for the owner-wide scorecard list.

pack:deeptutor-daily-masterydeeptutorscorecardstudent
by recued-core pinned v3
Require DeepTutor records runtime
Background automation

Use “Require DeepTutor records runtime” in Recued. It confirms this server can store the class records the other DeepTutor workflows depend on, and stops with a clear message when it cannot.

by recued-core pinned v1
View pack details, dependencies, and permissions →

Reply capture

Hidden and reactive: it fires on new mail and does nothing unless the subject carries exactly one [#recued:v3:<assessment>] marker.

What the marker carries now

One opaque assessment record id, and nothing else. The v2 marker packed kind, class segment and locator as three colon-separated fields, which existed only because a flat data.shared key had to be reconstructed from the subject line. The record id resolves all three by lookup, so the subject cannot disagree with the record.

What must hold before anything is written

  1. exactly one marker, whose payload is a 64-character lowercase hex id;
  2. the assessment record exists, is prepared or delivered, and names an artifact;
  3. the artifact file still hashes to the digest the delivering run recorded;
  4. the sender matches exactly one recipient on that artifact — not zero, not two;
  5. no answer has been captured for this student on this assessment yet;
  6. the mail body came back untruncated and non-empty.

The reply is written to a file, read back, re-hashed and re-parsed before the answer record is created; only a pointer and digest go in the record. The answer is a create, not an upsert, so a duplicate delivery of the same reply loses rather than overwriting the first capture.

How it works 66 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Data fetch
▼ message core.mail.get
Get mail
▼
Process (65 steps)
■ defaults defaults
Apply defaults
■ from_trimmed trim
Trim whitespace from from raw
■ from_email lowercase
Convert from trimmed to lowercase
■ marker_present compare
Check if subject contains [#recued:v3:
■ marker_split split
Split subject into parts
■ marker_split_count count
Count items in marker split
■ marker_tail default
Apply default
■ marker_close_split split
Split marker tail into parts
■ marker_payload default
Apply default
■ marker_parts split
Split marker payload into parts
■ assessment_id default
Apply default
■ assessment_id_bounded_value truncate
Truncate assessment id to a max length
■ assessment_id_bounded compare
Check if assessment id equals assessment id bounded value
■ assessment_id_chars split
Split assessment id into parts
■ assessment_id_length count
Count items in assessment id chars
■ assessment_id_shaped compare
Check if assessment id length equals 64
■ marker_valid all
Check if all conditions are true
◆ assessment recued-core.deeptutor-records.assessment.get
Get assessment on deeptutor records
skip: step.marker_valid not_equal true
■ assessment_state_valid any
Check if any of the conditions are true
■ assessment_valid all
Check if all conditions are true
■ artifact_id replace
Replace text in assessment record artifact ref
◆ artifact_row recued-core.deeptutor-records.artifact.get
Get artifact on deeptutor records
skip: step.assessment_valid not_equal true
■ artifact_row_valid all
Check if all conditions are true
◆ assessment_artifact_read core.storage.file.read
Read storage file
skip: step.artifact_row_valid not_equal true
■ assessment_artifact_text decode_base64
Apply decode_base64
skip: step.artifact_row_valid not_equal true
■ assessment_artifact_sha256 sha256
Apply sha256
skip: step.artifact_row_valid not_equal true
■ assessment_artifact json_parse
Apply json_parse
skip: step.artifact_row_valid not_equal true
■ artifact_recipient_count count
Count items in assessment artifact recipients
■ artifact_question_count count
Count items in assessment artifact questions
■ assessment_artifact_valid all
Check if all conditions are true
■ matched_recipients filter
Filter by condition
skip: step.assessment_artifact_valid not_equal true
■ matched_count count
Count items in matched recipients
■ sender_valid compare
Check if matched count equals 1
■ customer_id default
Apply default
■ answer_id_seed json_stringify
Apply json_stringify
■ answer_id sha256
Apply sha256
■ student_id_seed json_stringify
Apply json_stringify
■ student_id sha256
Apply sha256
◆ existing_answer recued-core.deeptutor-records.answer.get
Get answer on deeptutor records
skip: step.sender_valid not_equal true
■ should_read_body all
Check if all conditions are true
◆ body_read core.mail.body-read
Body read mail
skip: step.should_read_body not_equal true
■ body_raw default
Apply default
■ body_trimmed trim
Trim whitespace from body raw
■ answer default
Apply default
■ should_capture all
Check if all conditions are true
■ captured_at date_add
Add 0 seconds to
■ submission_artifact merge
Combine objects together
■ submission_artifact_text json_stringify
Apply json_stringify
■ submission_artifact_size_bytes utf8_byte_length
Apply utf8_byte_length
■ submission_artifact_sha256 sha256
Apply sha256
■ submission_artifact_size_valid all
Check if all conditions are true
⚠ submission_artifact_size_guard guard
Stop if submission artifact size valid equals
■ submission_artifact_path template
Generate text from a template
■ submission_artifact_body_b64 encode_base64
Apply encode_base64
◆ write_submission_artifact core.storage.file.write
Write storage file
◆ read_written_submission_artifact core.storage.file.read
Read storage file
■ written_submission_artifact_text decode_base64
Apply decode_base64
■ written_submission_artifact_sha256 sha256
Apply sha256
■ written_submission_artifact json_parse
Apply json_parse
■ written_submission_artifact_valid all
Check if all conditions are true
⚠ written_submission_artifact_guard guard
Stop if written submission artifact valid equals
■ submission_artifact_id_seed json_stringify
Apply json_stringify
■ submission_artifact_id sha256
Apply sha256
◆ submission_artifact_record recued-core.deeptutor-records.artifact.upsert
Upsert artifact on deeptutor records
◆ capture recued-core.deeptutor-records.answer.create
Create answer on deeptutor records

Uses (9 operations)

Mail Get mail core.mail.get
Pack operation Get assessment on deeptutor records recued-core.deeptutor-records.assessment.get
Pack operation Get artifact on deeptutor records recued-core.deeptutor-records.artifact.get
Files Read storage file core.storage.file.read
Pack operation Get answer on deeptutor records recued-core.deeptutor-records.answer.get
Mail Body read mail core.mail.body-read
Files Write storage file core.storage.file.write
Pack operation Upsert artifact on deeptutor records recued-core.deeptutor-records.artifact.upsert
Pack operation Create answer on deeptutor records recued-core.deeptutor-records.answer.create

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Read Mail core.mail.get read-only
Write Pack DeepTutor Records external change
Read: assessment.get · No approvalRead: artifact.get · No approvalRead: answer.get · No approvalWrite: artifact.upsert · No approvalWrite: answer.create · No approval
Read Files core.storage.file.read read-only
Read Mail core.mail.body-read read-only
Write Files core.storage.file.write external change

Data it touches

SurfacesMailFiles
Warehousedata.shareddata.mail

About

Tags

pack:deeptutor-daily-masterydeeptutorstudentanswerreactivemailrecordsfile-artifactinternal

Details

66 steps recipe_id: capture-deeptutor-answer