Access Google Forms with managed OAuth authentication. Create forms, add questions, retrieve and export responses to Excel — all via natural language.
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/forms/list')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
text
https://api.gformsfree.com/skill
All requests require the API key in the Authorization header:
text
Authorization: Bearer $GFORMS_API_KEY
Environment Variable: Set your API key as GFORMS_API_KEY:
bash
export GFORMS_API_KEY="YOUR_API_KEY"
bash
GET /forms/list
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/forms/list')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Response:
json
{
"forms": [
{
"formId": "1BxiM...",
"title": "Customer Feedback",
"responderUri": "https://forms.gle/xxx",
"editUri": "https://docs.google.com/forms/d/xxx/edit"
}
]
}
bash
GET /forms/{formId}
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/forms/FORM_ID')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Create a new Google Form with questions in a single request.
bash
POST /forms/create
python
import urllib.request, os, json
data = json.dumps({
"title": "Customer Feedback Survey",
"description": "We'd love to hear from you.",
"questions": [
{
"type": "TEXT",
"title": "What is your name?",
"required": True
},
{
"type": "RADIO",
"title": "How satisfied are you?",
"required": True,
"options": ["Very satisfied", "Satisfied", "Neutral", "Dissatisfied"]
},
{
"type": "SCALE",
"title": "Rate your experience",
"low": 1,
"high": 5,
"lowLabel": "Poor",
"highLabel": "Excellent"
},
{
"type": "CHECKBOX",
"title": "Which features do you use?",
"options": ["Feature A", "Feature B", "Feature C"]
}
]
}).encode()
req = urllib.request.Request(
'https://api.gformsfree.com/skill/forms/create',
data=data, method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Response:
json
{
"formId": "1BxiM...",
"responderUri": "https://forms.gle/xxx",
"editUri": "https://docs.google.com/forms/d/xxx/edit"
}
Question types: TEXT · RADIO · CHECKBOX · SCALE · DATE · TIME
bash
GET /forms/{formId}/responses
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/forms/FORM_ID/responses')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Get a natural language summary of all form responses.
bash
GET /forms/{formId}/summary
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/forms/FORM_ID/summary')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Use the returned summary field to present trends and insights to the user.
Generate a downloadable Excel file of all form responses.
bash
POST /forms/export
python
import urllib.request, os, json
data = json.dumps({"formId": "FORM_ID"}).encode()
req = urllib.request.Request(
'https://api.gformsfree.com/skill/forms/export',
data=data, method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
Response:
json
{
"downloadUrl": "https://api.gformsfree.com/skill/files/xxx.xlsx",
"expiresIn": 600
}
Return downloadUrl to the user. Remind them the link expires in 10 minutes.
StatusMeaning400Missing or invalid request parameters401Invalid or missing API key — check GFORMS_API_KEY403Subscription expired — renew in the Forms for Google Drive App429Rate limited (10 req/sec per account)4xx/5xxPassthrough error from Google Forms API
Verify your key is valid:
python
import urllib.request, os, json
req = urllib.request.Request('https://api.gformsfree.com/skill/auth/check')
req.add_header('Authorization', f'Bearer {os.environ["GFORMS_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
If invalid, regenerate in the app: Settings → Connect AI Agent → Regenerate Key
GFORMS_API_KEY value in any message to the userresponderUri (share with respondents) and editUri (for editing)