Management, submission, and review of forms
The form is managed, sent and put under review with the different Google components.
+4
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
googlecalendarcomponent-jaqxl[Crear evento]
style googlecalendarcomponent-jaqxl stroke:#a170ff
GmailMesageComponent-uj25t[<div><img src="/_astro/gmail.CLxyIGOu.svg" style="height: 20px !important;width: 20px !important"/></div>Enviar correo]
style GmailMesageComponent-uj25t stroke:#a170ff
GDriveFilesComponent-0mjfr[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Mover a carpeta de formularios]
style GDriveFilesComponent-0mjfr stroke:#a170ff
GSheetCellComponent-fmnmq[Obtener datos para preguntas]
style GSheetCellComponent-fmnmq stroke:#a170ff
googleFormscomponent-aowyt[Crear formulario]
style googleFormscomponent-aowyt stroke:#a170ff
googleFormsDatacomponent-gtnj5[Crear preguntas de formulario]
style googleFormsDatacomponent-gtnj5 stroke:#a170ff
GDriveFolderComponent-4gs0x[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Obtener carpeta de formularios]
style GDriveFolderComponent-4gs0x stroke:#a170ff
ParseData-hsneb[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Obtener id de carpeta]
style ParseData-hsneb stroke:#a170ff
ParseData-l0t0p[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Obtener Datos]
style ParseData-l0t0p stroke:#a170ff
Prompt-63lqj[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Consulta]
style Prompt-63lqj stroke:#a170ff
TextInput-m37hp[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Email a enviar]
style TextInput-m37hp stroke:#a170ff
LanggraphReactAgent-fkij3[Agent]
style LanggraphReactAgent-fkij3 stroke:#a170ff
OpenAIModel-4xmn9[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI]
style OpenAIModel-4xmn9 stroke:#a170ff
ChatOutput-9yddi[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-9yddi stroke:#a170ff
TextInput-60yea[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Nombre del formulario]
style TextInput-60yea stroke:#a170ff
GSheetCellComponent-fmnmq -.- googleFormsDatacomponent-gtnj5
linkStyle 0 stroke:#a170ff
googleFormsDatacomponent-gtnj5 -.- googleFormscomponent-aowyt
linkStyle 1 stroke:#a170ff
GDriveFolderComponent-4gs0x -.- ParseData-hsneb
linkStyle 2 stroke:#a170ff
googleFormscomponent-aowyt -.- ParseData-l0t0p
linkStyle 3 stroke:#a170ff
ParseData-l0t0p -.- Prompt-63lqj
linkStyle 4 stroke:#a170ff
TextInput-m37hp -.- Prompt-63lqj
linkStyle 5 stroke:#a170ff
Prompt-63lqj -.- LanggraphReactAgent-fkij3
linkStyle 6 stroke:#a170ff
GmailMesageComponent-uj25t -.- LanggraphReactAgent-fkij3
linkStyle 7 stroke:#a170ff
OpenAIModel-4xmn9 -.- LanggraphReactAgent-fkij3
linkStyle 8 stroke:#a170ff
LanggraphReactAgent-fkij3 -.- ChatOutput-9yddi
linkStyle 9 stroke:#a170ff
TextInput-m37hp -.- googlecalendarcomponent-jaqxl
linkStyle 10 stroke:#a170ff
googlecalendarcomponent-jaqxl -.- LanggraphReactAgent-fkij3
linkStyle 11 stroke:#a170ff
TextInput-60yea -.- googleFormscomponent-aowyt
linkStyle 12 stroke:#a170ff
GDriveFilesComponent-0mjfr -.- LanggraphReactAgent-fkij3
linkStyle 13 stroke:#a170ff
ParseData-hsneb -.- GDriveFilesComponent-0mjfr
linkStyle 14 stroke:#a170ff
📄 AI‑Based Form Management Workflow
🧩 Overview
This workflow automates the end‑to‑end process of creating a Google Form from spreadsheet data, publishing the form, moving the form file to a specified Drive folder, scheduling a review event in Google Calendar, and notifying a user via Gmail. An AI agent orchestrates the steps using OpenAI’s language model and integrates with the Google ecosystem through dedicated components.
⚙️ Main Features
- Data extraction from a Google Sheet to build form questions.
- Dynamic form creation with a user‑defined title and description.
- Automated email notification to a specified recipient.
- Calendar event scheduling for a review meeting.
- File management that moves the created form to a chosen Drive folder.
- AI‑driven decision making that interprets form data and coordinates the tools.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Google Sheet Cell Component | Extracts question data from a spreadsheet. | Spreadsheet ID, Sheet name, Cell range, Header flag. | Structured question data (Data). |
| Google Forms Data Component | Transforms spreadsheet data into form‑question objects. | Question data, Mapping mode. | List of form questions (Data). |
| Google Forms Component | Creates a new Google Form with supplied title and questions. | Title, Description, Questions list. | Form metadata (Data). |
| Text Input (Form Name) | Collects the desired form title from the user. | User‑entered title text. | Title message. |
| Parse Data (Form Details) | Formats the form metadata into a human‑readable prompt. | Form data, Template string. | Text containing form details. |
| Prompt | Builds the AI prompt using form details and recipient email. | Form details text, Recipient email. | Prompt message. |
| Text Input (Email to Send) | Captures the email address of the recipient. | Email address. | Email address message. |
| Langgraph React Agent | Orchestrates the entire process, invoking tools based on the prompt. | Prompt, LLM model, Tool set (Gmail, Calendar, Drive). | Response message. |
| Google Calendar Component | Creates or retrieves a calendar event for the review meeting. | Summary, Attendees, Dates, Description. | Calendar event data. |
| Gmail Message Component | Sends a notification email to the recipient. | Recipient, Subject, Body, Attachments. | Email sent confirmation. |
| Google Drive Files Component | Moves the newly created form into the specified Drive folder. | File ID, Folder ID, Operation (Move). | Drive operation result. |
| Chat Output | Displays the AI’s final message to the user. | Response message. | Visible chat message. |
Note: The Parse Data component that extracts a folder ID for the Drive operation is internally invoked by the agent; it is not exposed as a separate user‑facing step.
🧠 Notes
- The workflow assumes valid Google Cloud credentials for Forms, Drive, and Calendar APIs, and an OpenAI API key for the LLM.
- All tool interactions (Gmail, Calendar, Drive) require the user to grant appropriate scopes (e.g.,
https://www.googleapis.com/auth/gmail.send,https://www.googleapis.com/auth/calendar.events,https://www.googleapis.com/auth/drive.file). - The agent relies on the Prompt template to guide the LLM; modifying the template may change the generated actions.
- The Calendar event is created with a default summary “Revisión formulario” and includes the form link in the body.
- The Gmail component sends a plain‑text email; attachments can be added if needed.
- The Drive component currently performs a Move operation; other operations (Upload, Copy, Delete) can be enabled if required.
- The workflow is designed for a single form per execution but can be extended to batch processing by enabling mapping mode on the relevant components.
- Error handling is managed at the component level; if a tool fails, the agent can be configured to retry or skip that step.