Documentation Generator
This workflow is an automated system designed to generate customized documents on the indicated topic in PDF format and save them in Google Drive.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
Prompt-rek36[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-rek36 stroke:#a170ff
OpenAIModel-qct7t[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI]
style OpenAIModel-qct7t stroke:#a170ff
PdfWriter-ht7y8[Pdf Writer]
style PdfWriter-ht7y8 stroke:#a170ff
GDriveFilesComponent-0mr8v[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Google Drive File Manager]
style GDriveFilesComponent-0mr8v stroke:#a170ff
TextInput-643iq[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Notas adicionales o instrucciones personalizadas]
style TextInput-643iq stroke:#a170ff
TextInput-ipla4[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Nivel de grado]
style TextInput-ipla4 stroke:#a170ff
TextInput-nup34[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Incluir clave de respuestas]
style TextInput-nup34 stroke:#a170ff
TextInput-nhmez[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Número de preguntas]
style TextInput-nhmez stroke:#a170ff
TextInput-sj7qo[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Asunto]
style TextInput-sj7qo stroke:#a170ff
TextInput-qcjq3[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Tema de la hoja de trabajo]
style TextInput-qcjq3 stroke:#a170ff
Prompt-rek36 -.- OpenAIModel-qct7t
linkStyle 0 stroke:#a170ff
OpenAIModel-qct7t -.- PdfWriter-ht7y8
linkStyle 1 stroke:#a170ff
PdfWriter-ht7y8 -.- GDriveFilesComponent-0mr8v
linkStyle 2 stroke:#a170ff
TextInput-643iq -.- Prompt-rek36
linkStyle 3 stroke:#a170ff
TextInput-ipla4 -.- Prompt-rek36
linkStyle 4 stroke:#a170ff
TextInput-nup34 -.- Prompt-rek36
linkStyle 5 stroke:#a170ff
TextInput-nhmez -.- Prompt-rek36
linkStyle 6 stroke:#a170ff
TextInput-sj7qo -.- Prompt-rek36
linkStyle 7 stroke:#a170ff
TextInput-qcjq3 -.- Prompt-rek36
linkStyle 8 stroke:#a170ff
Documentation Generator Workflow
🧩 Overview
The workflow automatically generates a customized worksheet in PDF format.
It collects user‑specified parameters (topic, subject, grade level, number of questions, whether to include an answer key, and any additional instructions), composes a prompt for an LLM, produces the worksheet text, converts that text to PDF, and uploads the file to a designated Google Drive folder.
⚙️ Main Features
- Collects all required inputs through dedicated text fields.
- Builds a structured prompt that incorporates user parameters.
- Sends the prompt to an OpenAI model to generate the worksheet content.
- Converts the generated text into a styled PDF document.
- Uploads the resulting PDF to Google Drive and stores it in the specified folder.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Text Input | Collects the topic of the worksheet | Topic | Text |
| Text Input | Collects the subject area | Subject | Text |
| Text Input | Collects the grade level | Grade Level | Text |
| Text Input | Collects the number of questions | Number of Questions | Text |
| Text Input | Specifies whether to include an answer key | Include Answer Key | Text |
| Text Input | Provides any additional instructions or notes | Additional Notes | Text |
| Prompt | Assembles a prompt template using all collected parameters | Text from the six Text Inputs | Prompt Message |
| OpenAI Model | Generates worksheet content from the prompt | Prompt Message | Text (Worksheet) |
| Pdf Writer | Converts the worksheet text into a PDF file with optional styling | Worksheet Text | PDF file path |
| Google Drive File Manager | Uploads the PDF to Google Drive in the chosen folder | PDF file path | Confirmation/Data record |
🧠 Notes
- The workflow requires valid OpenAI API credentials and a Google Drive OAuth token with file‑write permissions.
- All inputs must be provided; missing values will result in incomplete prompts and potential errors.
- The OpenAI model is configured with a temperature of 0.1 to produce consistent, deterministic outputs.
- The PDF writer applies a default CSS style; this can be customized by modifying the
css_stringinput. - The Google Drive File Manager performs an Upload operation; other operations (Copy, Move, etc.) can be configured but are not used in this workflow.
- The system does not expose internal identifiers or connection details in the documentation, maintaining a clear, user‑friendly interface.