How to Automate Blog Publishing with Make.com, Gemini AI, and GitHub Pull Requests
Stop Publishing Blog Posts Manually
If you run an Astro-based portfolio or developer blog, you already know the content grind. Writing, formatting, committing, and deploying one post per week is a real time cost — especially when you’re juggling client work or a full-time job.
The good news: the entire pipeline can be automated. This guide walks you through building a zero-cost blog automation system using Make.com, Google Gemini AI, and the GitHub API. Every generated post lands in a Pull Request for your review before anything goes live. You stay in control. The system handles the heavy lifting.
What Is a Make.com Blog Automation Pipeline?
A Make.com blog automation pipeline is a no-code workflow that reads a blog topic from a Google Sheet, generates a full SEO article using an AI model, commits it as a Markdown file directly to your GitHub repository, and opens a Pull Request for review — all triggered automatically on a schedule.
For Astro sites hosted on platforms like AWS S3, Netlify, or Vercel, this approach fits naturally into the existing workflow. Your content lives in src/content/blog/ as .md files. The automation creates new files in that exact folder. GitHub Actions handles the build and deployment on merge — no extra infrastructure required.
The Full Architecture
The pipeline runs six modules in sequence:
- Google Sheets — reads the next row where
status = readyfrom your content calendar - Google Gemini 2.5 Flash — generates a full SEO article in Astro Markdown format
- GitHub API (PUT) — commits the
.mdfile to adrafts/your-slugbranch - GitHub API (POST) — opens a Pull Request from the draft branch to
main - Google Sheets — marks the row status as
drafted - Gmail — sends a notification with the PR link to review and merge
When you merge the PR, GitHub Actions triggers automatically. Astro builds, your hosting platform syncs the new files, and the post goes live within minutes.
Step 1 — Set Up Your Google Sheets Content Calendar
Your spreadsheet acts as the editorial control panel. Create a new sheet with these exact column headers:
| Column | Header |
|---|---|
| A | Title |
| B | Slug |
| C | Primary Keyword |
| D | Secondary Keyword |
| E | Target Audience |
| F | Word Count |
| G | Status |
Set the first post you want to publish to status = ready. Keep all other rows as pending. Each week, flip one row to ready — Make.com picks it up automatically on your scheduled trigger day. After processing, the status auto-updates to drafted so you always know where every article stands.
Step 2 — Get Your Free Gemini API Key
Go to aistudio.google.com, sign in with any Google account, and click Get API Key → Create API Key. No billing setup is required. The free tier allows 1,500 requests per day — more than enough for a weekly publishing cadence.
Copy the key. You will paste it into Make.com when setting up the Gemini module connection.
Step 3 — Create a GitHub Personal Access Token
In GitHub, go to Settings → Developer Settings → Personal Access Tokens → Fine-grained tokens and click Generate new token. Give it access to your target repository only, and set these permissions:
- Contents → Read and Write
- Pull requests → Read and Write
Copy the token immediately — GitHub only shows it once. Store it somewhere secure before moving on.
Step 4 — Build the Make.com Scenario
Log in to make.com and create a new scenario. Add the following modules in order:
Module 1 — Google Sheets: Watch Rows
Search for Google Sheets → Watch Rows. Connect your Google account, select your content calendar spreadsheet, and set Limit to 1. Add a filter on the route: status equals ready. This ensures only one post is processed per run.
Module 2 — Google Gemini AI: Generate Content
Search for Google Gemini AI → Generate Content. Paste your Gemini API key when prompted. Set the model to gemini-2.5-flash. Under Messages, set Role to user and add a Part with your article prompt. Map {{title}}, {{slug}}, {{primary_keyword}}, {{secondary_keyword}}, {{target_audience}}, and {{word_count}} from the Google Sheets module using the variable picker.
Your prompt should instruct Gemini to output raw Astro Markdown only — starting with the YAML frontmatter block and ending with the last line of article content. No wrapping code fences, no explanation text.
Module 3 — HTTP: Commit the Markdown File to GitHub
Add an HTTP → Make a Request module with these settings:
- URL:
https://api.github.com/repos/YOUR-USERNAME/YOUR-REPO/contents/src/content/blog/{{slug}}.md - Method:
PUT - Authentication type: API key → add header
Authorization: Bearer YOUR_GITHUB_TOKEN - Body content type:
application/json - Body input method:
JSON string
Paste this JSON into the body content field:
{
"message": "feat: add blog post - {{title}}",
"content": "{{base64(markdown_content)}}",
"branch": "drafts/{{slug}}"
}
Replace {{markdown_content}} by using the variable picker to select the Gemini output text. The base64() function is built into Make.com — wrap the Gemini variable directly inside it. This encodes the full markdown article so the JSON body stays valid regardless of newlines, quotes, or special characters in the content.
Module 4 — HTTP: Create Pull Request
Add a second HTTP → Make a Request module:
- URL:
https://api.github.com/repos/YOUR-USERNAME/YOUR-REPO/pulls - Method:
POST - Same authentication header as Module 3
- Body input method:
JSON string
{
"title": "New Blog Post: {{title}}",
"body": "Auto-generated post ready for review.\n\nSlug: {{slug}}\nKeyword: {{primary_keyword}}\nAudience: {{target_audience}}\n\nReview the .md file, make any edits, then merge to publish.",
"head": "drafts/{{slug}}",
"base": "main"
}
Module 5 — Google Sheets: Update Row Status
Add Google Sheets → Update a Row. Map the row number from Module 1 and set the Status column to drafted. Optionally set a Published Date column to today’s date using {{formatDate(now; "YYYY-MM-DD")}}.
Module 6 — Gmail: Send Notification
Add Gmail → Send an Email to notify yourself when a new draft PR is ready. Include the PR link and article title in the subject line so you can act on it immediately.
Step 5 — Set Up GitHub Actions for Auto-Deploy
In your repository, create .github/workflows/deploy.yml. The workflow should trigger on pushes to main, run npm install and npm run build, and sync the dist/ folder to your hosting platform. Store all credentials (AWS keys, Netlify tokens, etc.) as GitHub repository secrets.
When you merge a PR, the entire deploy process runs automatically. On most platforms, the new post is live within two to three minutes of merging.
Step 6 — Set Your Schedule
In Make.com, click the clock icon on the trigger module and set it to run weekly on a fixed day and time. Tuesday or Wednesday mornings work well — posts indexed mid-week tend to see stronger organic traffic before the weekend.
Common Mistakes to Avoid
Not using base64 on the content field — pasting raw Gemini markdown directly into the JSON body causes an InvalidConfigurationError because newlines and quotes break the JSON structure. Always wrap the content variable with base64().
Mismatched frontmatter schema — Astro throws a build error if the generated frontmatter is missing fields defined in your src/content/config.ts. Open an existing .md file in your repo, copy its exact frontmatter keys, and add all of them to your Gemini prompt output format.
Setting all rows to ready at once — Make.com will process every ready row in a single run. Keep only one row as ready at a time and flip the next one manually each week.
Committing directly to main — always commit to a draft branch and review via Pull Request. The PR step is what keeps unreviewed AI content off your live site.
Wrong module number in variable references — when mapping the Gemini output as {{9.markdown_content}}, the number matches your actual module position in Make.com. Use the variable picker to confirm the correct reference rather than typing the number manually.
Ready to Build Your Next Project?
Papan Sarkar is a Senior Full Stack Developer and Python/Django Expert available globally for contract, consulting, and leadership roles. With 5+ years delivering production-grade SaaS, AI platforms, and compliance systems across USA, UK, EU, and Singapore, he brings real results to ambitious teams.