{"product_id":"apify-gemini-cold-email-drafts-to-gmail-n8n-workflow","title":"Apify + Gemini Cold Email Drafts to Gmail (n8n Workflow)","description":"\u003ch3\u003eTurn Apify leads into Gmail cold email drafts with Google Gemini (in n8n)\u003c\/h3\u003e\n\u003cp\u003eGet an n8n workflow that automatically pulls lead emails from an Apify dataset, uses Google Gemini to write personalized cold email subject + body, and then creates a ready-to-review draft in Gmail for each lead.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives an Apify dataset webhook\u003c\/strong\u003e via a POST webhook that includes a run\/dataset details object with \u003cem\u003eresource.defaultDatasetId\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches dataset items from the Apify API\u003c\/strong\u003e using your Apify API token and the provided dataset ID.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFilters for valid leads\u003c\/strong\u003e, keeping only items that include an \u003cem\u003eemails\u003c\/em\u003e field.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates cold email content with Google Gemini\u003c\/strong\u003e by sending lead details (company name, website, and location) to Gemini and requesting structured output (JSON with subject and body).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses Gemini’s JSON output\u003c\/strong\u003e into usable fields for the email \u003cem\u003esubject\u003c\/em\u003e and \u003cem\u003ebody\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates a Gmail draft\u003c\/strong\u003e using the generated subject and email body (via your configured Gmail OAuth2 connection).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRun lead-generation with \u003cstrong\u003eApify\u003c\/strong\u003e, then auto-draft outreach emails in \u003cstrong\u003eGmail\u003c\/strong\u003e for sales prospecting.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cstrong\u003eSaaS operators\u003c\/strong\u003e, continuously convert scraped leads into personalized cold email drafts without manual copywriting.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cstrong\u003eautomation engineers\u003c\/strong\u003e, connect Apify → Gemini → Gmail using an n8n workflow that’s easy to trigger on new dataset runs.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes \/ components:\u003c\/strong\u003e Webhook, HTTP Request, Filter, Set, Gmail, and \u003ccode\u003en8n-nodes-langchain\u003c\/code\u003e Google Gemini.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Apify API (dataset items), Google Gemini (email generation in JSON), Gmail OAuth2 (create draft).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup highlights:\u003c\/strong\u003e add Apify bearer token, configure Gemini credentials and model ID, and connect Gmail with permission to create drafts.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46132854456499,"sku":"N8N-20165","price":6.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/4up5x8-eAmrhparaEYlZz_w8fFarrQ.png?v=1790759677","url":"https:\/\/buyflowscripts.com\/products\/apify-gemini-cold-email-drafts-to-gmail-n8n-workflow","provider":"N8N Commerce","version":"1.0","type":"link"}