{"product_id":"automate-linkedin-posts-with-n8n-openai-pexels-google-sheets","title":"Automate LinkedIn Posts with n8n: OpenAI, Pexels \u0026 Google Sheets","description":"\u003ch3\u003eAutomatically generate, attach an image, and publish LinkedIn posts from your Google Sheets\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow turns a daily Google Sheets “TO DO” topic into a complete LinkedIn post—using OpenAI to write the copy and Tavily to inform it, then Pexels to pick a matching landscape image, upload it to LinkedIn, publish, and finally log the generated content back into Google Sheets.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on a daily schedule\u003c\/strong\u003e and reads the first Google Sheets row where the \u003cem\u003eStatus\u003c\/em\u003e column is set to “TO DO”.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eTavily Search API\u003c\/strong\u003e to search the web for the row’s \u003cstrong\u003eTopic\u003c\/strong\u003e and collects content from the top three results.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eOpenAI (GPT-4)\u003c\/strong\u003e to synthesize those excerpts into a single LinkedIn post and outputs JSON including the post text, an image search query, and image alt text.\u003c\/li\u003e\n  \u003cli\u003eRefines the visual search intent with \u003cstrong\u003eOpenAI\u003c\/strong\u003e to produce a \u003cstrong\u003e2–5 keyword\u003c\/strong\u003e Pexels query, then pulls \u003cstrong\u003e10 landscape images\u003c\/strong\u003e from \u003cstrong\u003ePexels\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eOpenAI (GPT-4o)\u003c\/strong\u003e to review the 10 Pexels image URLs, select the best match, and extract the chosen image URL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDownloads the selected image\u003c\/strong\u003e, uploads it to LinkedIn via the \u003cstrong\u003eLinkedIn REST image upload endpoint\u003c\/strong\u003e, and \u003cstrong\u003epublishes the post\u003c\/strong\u003e with the uploaded image.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWrites the generated content back to Google Sheets\u003c\/strong\u003e for the matching row.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eMaintain a simple content calendar: add a Topic to Google Sheets, set it to “TO DO,” and let n8n publish daily.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators and automation engineers can scale consistent LinkedIn posting without manual research and image selection.\u003c\/li\u003e\n  \u003cli\u003eTeams can reuse the same workflow structure to operationalize “topic → research → post → image → publish.”\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e (OAuth): fetches “TO DO” rows and updates generated output.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e: supports Tavily and the \u003cstrong\u003eLinkedIn REST\u003c\/strong\u003e image upload.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI\u003c\/strong\u003e: GPT-4 for post synthesis and GPT-4o for Pexels image selection.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePexels\u003c\/strong\u003e: searches and evaluates landscape images; selects the best matching URL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLinkedIn\u003c\/strong\u003e: uploads the image and publishes the post.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824219349171,"sku":"N8N-18142","price":4.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/I0XL64ee1Saa6-zbI8lAn_W6EupNUG.png?v=1786612924","url":"https:\/\/buyflowscripts.com\/products\/automate-linkedin-posts-with-n8n-openai-pexels-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}