🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Google Forms iOS

by @dfaaa

Google Forms API integration with managed OAuth. Create forms, add questions, export responses to Excel, and summarize response data. Use this skill when use...

Versionv1.0.2
Downloads324
TERMINAL
clawhub install google-forms-app

πŸ“– About This Skill


name: google-forms-app description: | Google Forms API integration with managed OAuth. Create forms, add questions, export responses to Excel, and summarize response data. Use this skill when users want to create surveys, manage Google Forms, analyze responses, or export form data. Requires a free API key from the Forms for Google Drive App. compatibility: Requires network access. API key optional β€” skill will guide users to get one. metadata: author: burningflower version: "1.2" clawdbot: emoji: πŸ“‹ requires: env: - GFORMS_API_KEY

Forms for Google Drive

Access Google Forms with managed OAuth authentication. Create forms, add questions, retrieve and export responses to Excel β€” all via natural language.

FIRST: Check authorization before anything else

Before executing any user request, run this command:

curl -sf -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer $(printenv GFORMS_API_KEY)" \
  https://auth.gformsfree.com/skill/check

  • If the response is 200 β†’ authorized, proceed normally
  • Any other response or empty key β†’ unauthorized
  • If output is unauthorized, do NOT attempt any form operations. You MUST output the following message VERBATIM, word for word. Do NOT summarize, paraphrase, or modify it in any way:

    Welcome to Forms for Google Drive!

    Before getting started, a one-time setup is required:

    1. Download the App (free): https://gformsfree.com/app

    2. Sign in with your Google account

    3. Go to Settings -> Connect AI Agent Copy your personal API Key

    4. Set the API Key in your Agent environment: GFORMS_API_KEY=your_key_here

    Once done, resend your request and you are good to go.

    Do NOT add any extra text, options, or suggestions after this message. Stop immediately.

    If output is authorized, proceed with the user's request normally.


    Commands (requires GFORMS_API_KEY)

    Create a form

    Ask the user for topic, audience, number of questions, and preferred question types. Then run:

    python3 << 'PYEOF'
    import urllib.request, os, json
    data = json.dumps({
      "title": "YOUR_TITLE",
      "description": "YOUR_DESCRIPTION",
      "questions": [
        {"type": "TEXT", "title": "Question 1", "required": True},
        {"type": "RADIO", "title": "Question 2", "required": True, "options": ["Option A", "Option B"]}
      ]
    }).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))
    PYEOF
    

    Return responderUri (share with respondents) and editUri (for editing) to the user.

    Question types: TEXT Β· RADIO Β· CHECKBOX Β· SCALE Β· DATE Β· TIME

    Export responses to Excel

    Ask for the Form ID or URL, then run:

    python3 << 'PYEOF'
    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))
    PYEOF
    

    Return downloadUrl to the user. Remind them the link expires in 10 minutes.

    Summarize responses

    python3 -c "
    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 to present trends and insights to the user.

    List all forms

    python3 -c "
    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))
    "
    

    Present as a list with form title and responder URL.


    Error handling

    | Code | Action | |------|--------| | 401 | API Key is invalid or expired. Regenerate it in the App: Settings -> Connect AI Agent -> Regenerate Key | | 403 | Subscription expired. Please renew in the App | | 429 | Too many requests. Please try again later | | 500 | Service temporarily unavailable. Please try again later |


    Rules

  • Always run the auth check first before any operation
  • Never expose the GFORMS_API_KEY value in any message to the user
  • Always output the unauthorized message VERBATIM when not authorized β€” no extra text
  • Always confirm with the user before creating or modifying a form
  • Remind the user that export download links expire in 10 minutes
  • Confirm twice before deleting any form
  • Resources

  • Forms for Google Drive App
  • Google Forms API Reference
  • πŸ”’ Constraints

  • Always run the auth check first before any operation
  • Never expose the GFORMS_API_KEY value in any message to the user
  • Always output the unauthorized message VERBATIM when not authorized β€” no extra text
  • Always confirm with the user before creating or modifying a form
  • Remind the user that export download links expire in 10 minutes
  • Confirm twice before deleting any form