Quick overview
This workflow runs daily, reads RSS news and your recent post history from Google Sheets, uses OpenAI to draft a new LinkedIn post in Brazilian Portuguese, fetches a relevant image from Pexels, and emails you for approval before publishing to LinkedIn and logging the result.
How it works
- Runs on a daily schedule (configured to trigger at 08:00).
- Reads your previously generated/published posts from Google Sheets to provide recent-topic context.
- Pulls the latest items from a predefined list of RSS feeds and sends the headlines and summaries to OpenAI to generate a new LinkedIn post as structured JSON.
- Parses the OpenAI JSON output into fields like topic, post text, theme, and source link, then queries the Pexels API to pick a matching image URL.
- Sends a Gmail message with the draft post and image link and waits for your response to approve, reject, or request a rewrite.
- If you request a rewrite, sends your feedback to OpenAI to surgically edit the post and loops back to re-parse and re-request approval.
- If you approve, downloads the selected image, uploads it to LinkedIn, publishes the post to your LinkedIn profile, and logs the outcome in Google Sheets (or logs rejection if you reject).
Setup
- Add credentials for Google Sheets, OpenAI, and Gmail, and update the Google Sheets document ID and sheet name used for reading history and logging outcomes.
- Replace placeholders for your author details in the OpenAI prompt (name, company, niche, audience, and only truthful proof points).
- Create a Pexels API key and paste it into the Pexels key placeholder so the workflow can fetch an image.
- Generate a LinkedIn OAuth access token with the required posting permissions, paste it into the LinkedIn token placeholders, and (optionally) enable and configure the organization URN nodes if you want to post to a company page.
- Set the review recipient email address in the Gmail approval step and ensure you can receive and submit the approval form responses.