Google Forms
Google Forms is a tool that lets you create, manage, and read Google Forms directly from Nappai. With this component you can build new forms, update existing ones, list all your forms, or pull the answers that people have submitted.
How it Works
When you use the component, Nappai talks to the Google Forms API.
- If you choose Create Formularies, the component will either create a brand‑new form or use an existing form as a template and then add the questions you specify.
- If you choose Get Formularies, it will list all the forms you own or fetch a single form by its ID.
- If you choose Update Formularies, it will modify the title, description, or questions of an existing form.
- If you choose Get Answers, it will pull the responses that people have submitted to a form, optionally filtered by time or a specific response ID.
All of this happens behind the scenes – you just fill in the fields in the dashboard and Nappai handles the API calls.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Create Formularies: Create a new form or add questions to an existing form.
- Get Formularies: Retrieve a list of your forms or a single form by ID.
- Update Formularies: Change the title, description, or questions of an existing form.
- Get Answers: Download the responses that people have submitted to a form.
To use the component, first select the operation you need in the Operation field.
Inputs
Mapping Mode
This component has a special mode called Mapping Mode. When you enable this mode using the toggle switch, an additional input called Mapping Data is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
-
Credential: Select the Google Forms API credential you created in Nappai.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Operation: Choose which action you want to perform.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Formularies File: Select the Google Forms to use. In Create Operation, if empty, it will create a new form.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Form ID: The form id for your Google Forms. In Create Operation, if empty, it will create a new form.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Title of the form: The title that will be used for the form.
Visible in: Create Formularies, Update Formularies -
Description of the form: A short description of the purpose of the form.
Visible in: Create Formularies, Update Formularies -
Questions to add to the form: A list of questions to add to the form. Each question is a dictionary with the following keys:
title: The question itself
type: The type of the question (choiceQuestion or textQuestion)
options: A list of options for choiceQuestion
paragraph: Whether the question should be displayed as a paragraph in case that the question type be textQuestion
choice_type: The type of choice for choiceQuestion (RADIO, CHECKBOX, DROP_DOWN)
Visible in: Create Formularies, Update Formularies -
Mode of Input: Mode to use.
If By Id its selected, the inputs will be Id. In Create Operation, the Form given will be used as a template.
If By Selection its selected, the inputs will be a selection. In Create Operation, the Form given will be used as a template.
If By Url its selected, the inputs will be Url. In Create Operation, the Form given will be used as a template.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Mapping Mode: Enable mapping mode to process multiple data records in batch.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Tools arguments metadata: Defines the arguments metadata for the tools.
Visible in: Create Formularies, Get Formularies, Update Formularies, Get Answers -
Filter: The filter to apply to the list of responses. Which form responses will be shown?
Currently, the only supported filters are:
timestamp > N – retrieving all form responses submitted after (but not at) timestamp N.
timestamp >= N – retrieving all form responses submitted at and after timestamp N.
For both supported filters, the timestamp must follow the RFC3339 UTC “Zulu” format.
Visible in: Get Answers -
Page Size: The number of responses to return. The page size is between 1 and 1000 (inclusive).
Visible in: Get Answers -
Response ID: The ID of the response to retrieve. If not provided, it will return all the responses.
Visible in: Get Answers
Outputs
- Data: The raw data returned by the Google Forms API (e.g., form details or answers).
- Tool: A tool representation that can be used by Nappai agents to call this component programmatically.
Usage Example
Scenario: You want to create a new feedback form and then read the answers that people submit.
-
Create Formularies
- Set Operation to Create Formularies.
- Leave Formularies File empty (so a new form is created).
- Enter a Title of the form like “Customer Feedback”.
- Add a short Description of the form.
- Add a few Questions to add to the form (e.g., a rating question and a comment question).
- Choose Mode of Input as By Id and leave Form ID empty.
- Click Run.
- The component returns the new form’s ID in the Data output.
-
Get Answers
- Set Operation to Get Answers.
- Paste the form ID you just created into Form ID.
- Optionally set a Filter like
timestamp > "2024-01-01T00:00:00Z"
to only get recent responses. - Set Page Size to 100.
- Click Run.
- The component returns all matching responses in the Data output.
You can then feed that data into other components or let an agent use the Tool output to ask questions about the responses.
Related Components
- Google Sheets Component – Read from or write to Google Sheets.
- Email Component – Send emails based on form responses.
- Data Transformation Component – Clean or reshape the data you get from Google Forms.
Tips and Best Practices
- Use Mapping Mode when you need to process many forms or responses at once.
- Keep your credentials safe – store them in Nappai’s credential manager and never share the raw client ID or secret.
- Validate timestamps before using the Filter field to avoid errors.
- Test with a small Page Size (e.g., 10) first to make sure your workflow works before scaling up.
- Use the Tool output if you want an AI agent to interact with the form automatically.
Security Considerations
- The component requires a Google Forms API credential. Make sure you only grant the minimal permissions needed (e.g., “Forms API” scope).
- Store the credential in Nappai’s secure credential store; do not hard‑code any secrets in your workflow.
- When using Mapping Mode, be careful not to expose sensitive data in the mapping data field.