# Generate secure worksheets and password-protected answer keys with OpenAI and Gmail

> Quick overview This workflow collects lesson details via an n8n form, uses OpenAI to generate a student worksheet and matching answer key, converts both to PDFs with HTMLCSS to PDF, password-locks the answer key, and emails the worksheet link plus the protected PDF via Gmail. How it works 1. Receives a submission from an n8n Form with the teacher email, grade level, topic, and a secret password. 2. Uses OpenAI to generate a five-question student worksheet as raw HTML with blank spaces for answers. 3. Converts the worksheet HTML into a PDF using HTMLCSS to PDF and captures a shareable PDF URL. 4. Uses OpenAI to rewrite the same worksheet as an ANSWER KEY HTML document with correct answers added in bold red text. 5. Converts the answer-key HTML to a PDF using HTMLCSS to PDF. 6. Password-protects the answer-key PDF using the secret password from the form. 7. Sends a Gmail message to the teacher with the worksheet link in the email body and the locked answer key attached. Setup 1. Add an O

- **Domain**: `n8n-workflow-22405.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/22405
- Page (HTML): https://agenstry.com/agents/n8n-workflow-22405.n8n.io
- Documentation: https://n8n.io/workflows/22405
