Generador de documentación
Este flujo de trabajo es un sistema automatizado diseñado para generar documentos personalizadas sobre la temática indicada en formato PDF y guardarlas en 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
Generador de documentación
🧩 Overview
This workflow automates the creation of educational worksheets. It takes user-defined parameters such as subject, topic, and grade level to generate a structured worksheet using an AI model. The final content is then formatted into a PDF and automatically saved to a specified location in Google Drive, streamlining the entire document creation and storage process.
⚙️ Main Features
- Collects multiple user inputs to define the worksheet's content, including topic, subject, grade level, and number of questions.
- Dynamically constructs a detailed prompt and uses an OpenAI model to generate the worksheet text, optionally including an answer key.
- Converts the generated text into a professionally styled PDF document.
- Automatically uploads and stores the final PDF file in a designated Google Drive folder.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Text Input (Multiple) | Provides the user-defined parameters for the worksheet. | User inputs for topic, subject, grade level, number of questions, answer key preference, and custom instructions. | Individual data parameters. |
| Prompt | Combines all user inputs into a structured and detailed instruction for the AI model. | All worksheet parameters (topic, subject, grade level, etc.). | A complete, formatted prompt message. |
| OpenAI Model | Generates the worksheet content based on the detailed prompt. | The structured prompt from the Prompt component. | The AI-generated worksheet text. |
| PDF Writer | Converts the generated text into a formatted PDF file. | The worksheet text from the AI model and optional CSS for styling. | A PDF file containing the worksheet. |
| Google Drive File Manager | Manages the storage of the final document by uploading it to Google Drive. | The generated PDF file and the target folder ID. | Confirmation of the file upload and storage. |
🧠 Notes
- The workflow requires valid API credentials for both OpenAI and Google Drive services to function.
- The AI model is configured with a low temperature setting to produce more deterministic and consistent outputs suitable for educational material.
- The default PDF styling uses a simple, readable format but can be customized via CSS within the PDF Writer component.
- The user must provide the ID of the target Google Drive folder for successful file storage.