# Zap blueprint: YouTube video to blog draft with Gemini

**This is a blueprint, not an import file.** Zapier has no public format for importing Zaps, so you rebuild these steps by hand in the Zap editor (our estimate: 20-30 minutes).
Full recipe: https://recipeagents.usestarbase.com/recipes/youtube-to-blog-draft-gemini

The Gemini call goes through Webhooks by Zapier, which is a Premium app, so this needs a paid Zapier plan.

1. **Trigger:** Zapier Forms (or Google Sheets, New Spreadsheet Row) with a field for the YouTube link and one for notes.
2. **Action:** Webhooks by Zapier, Custom Request. Method POST. URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash-lite:generateContent
   - Headers: x-goog-api-key = your Gemini API key, Content-Type = application/json
   - Data: {"contents":[{"role":"user","parts":[{"fileData":{"fileUri":"THE YOUTUBE LINK"}},{"text":"THE PROMPT FROM THE RECIPE PAGE"}]}],"generationConfig":{"responseMimeType":"application/json","maxOutputTokens":8192}}
   - Use a normal watch link (https://www.youtube.com/watch?v=...). The video must be public.
3. **Action:** Code by Zapier (or Formatter, Import JSON) to read candidates[0].content.parts[0].text as JSON and split out title, meta_description, draft and check_these.
4. **Action:** Google Docs, Create Document from Text, with the title and the draft, followed by the check list.
5. **Test each step** with one of your own videos, then turn the Zap on.

## Where it breaks
- Private and unlisted videos are not accepted; the free tier stops at 8 hours of YouTube video a day.
- If finishReason is MAX_TOKENS the JSON is cut off: raise maxOutputTokens.
- Check every line in check_these against the video before you publish.
