DEV Community

Fatih Dağüstü
Fatih Dağüstü

Posted on • Originally published at fatihai.app

How I Built a $0 Marketing Engine Using Only Free APIs

TLDR

  • I built a $0 marketing engine using only free API tiers from Dev.to, Brevo, Google Search Console, Telegram Bot, IndexNow, Groq, and GitHub Actions
  • This system automates content distribution, email marketing, SEO optimization, notifications, instant indexing, AI content generation, and scheduling
  • The free API tiers have limitations, but with careful planning, you can build a robust marketing engine without incurring costs
  • By following this tutorial, you can replicate this system and start automating your marketing efforts

As a developer, I've always been fascinated by the concept of marketing automation. However, most marketing automation tools come with a hefty price tag, which can be a significant barrier for small businesses or solo entrepreneurs. Recently, I stumbled upon an interesting statistic: 80% of marketers believe that automation is essential for their business, but only 20% have actually implemented it. This got me thinking - what if I could build a marketing automation system using only free API tiers? I decided to take on the challenge, and the result was a $0 marketing engine that has been generating impressive results.

Step 1: Content Distribution with Dev.to API

To start building my marketing engine, I began by integrating the Dev.to API for content distribution. The Dev.to API allows you to programmatically publish articles, which is perfect for automating content distribution. Here's an example of how you can use the Dev.to API in Python:

import requests

api_key = "YOUR_API_KEY"
article_title = "Your Article Title"
article_content = "Your article content"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

data = {
    "article": {
        "title": article_title,
        "body_markdown": article_content
    }
}

response = requests.post("https://dev.to/api/articles", headers=headers, json=data)

if response.status_code == 201:
    print("Article published successfully")
else:
    print("Error publishing article")
Enter fullscreen mode Exit fullscreen mode

Note: The Dev.to API has a rate limit of 50 requests per hour, so be sure to plan your content distribution strategy accordingly.

Step 2: Email Marketing with Brevo Free Tier

Next, I integrated the Brevo free tier for email marketing. Brevo offers a generous free tier that allows you to send up to 100 emails per day, which is perfect for small businesses or solo entrepreneurs. To get started with Brevo, you'll need to create an account and obtain an API key. Here's an example of how you can use the Brevo API in Node.js:

const axios = require("axios");

const apiKey = "YOUR_API_KEY";
const recipientEmail = "recipient@example.com";
const emailSubject = "Your Email Subject";
const emailBody = "Your email body";

const headers = {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json"
}

const data = {
    "recipient": recipientEmail,
    "subject": emailSubject,
    "body": emailBody
}

axios.post("https://api.brevo.com/v1/emails", data, { headers })
    .then(response => {
        if (response.status === 201) {
            console.log("Email sent successfully")
        } else {
            console.log("Error sending email")
        }
    })
    .catch(error => {
        console.error(error)
    })
Enter fullscreen mode Exit fullscreen mode

When building and launching a SaaS product, it's essential to have a solid marketing strategy in place. I recently came across the SaaS Launch Blueprint, a complete playbook to build, launch, and scale your SaaS to $10K MRR, which provides actionable advice on marketing automation and more.

Step 3: SEO Optimization with Google Search Console API

To optimize my website for search engines, I integrated the Google Search Console API. The Google Search Console API allows you to programmatically retrieve search analytics data, which is essential for SEO optimization. Here's an example of how you can use the Google Search Console API in Python:

import requests

api_key = "YOUR_API_KEY"
site_url = "https://example.com"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

data = {
    "siteUrl": site_url
}

response = requests.get("https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run", headers=headers, params=data)

if response.status_code == 200:
    print("SEO data retrieved successfully")
else:
    print("Error retrieving SEO data")
Enter fullscreen mode Exit fullscreen mode

Note: The Google Search Console API has a rate limit of 2,000 requests per day, so be sure to plan your SEO optimization strategy accordingly.

Step 4: Notifications with Telegram Bot API

To receive notifications when certain events occur, I integrated the Telegram Bot API. The Telegram Bot API allows you to programmatically send notifications, which is perfect for automating notifications. Here's an example of how you can use the Telegram Bot API in Node.js:

const axios = require("axios");

const botToken = "YOUR_BOT_TOKEN";
const chatId = "YOUR_CHAT_ID";
const message = "Your notification message";

const headers = {
    "Content-Type": "application/json"
}

const data = {
    "chat_id": chatId,
    "text": message
}

axios.post(`https://api.telegram.org/bot${botToken}/sendMessage`, data, { headers })
    .then(response => {
        if (response.status === 200) {
            console.log("Notification sent successfully")
        } else {
            console.log("Error sending notification")
        }
    })
    .catch(error => {
        console.error(error)
    })
Enter fullscreen mode Exit fullscreen mode

Step 5: Instant Indexing with IndexNow

To get my website indexed instantly, I integrated IndexNow. IndexNow allows you to programmatically submit URLs for indexing, which is essential for SEO optimization. Here's an example of how you can use IndexNow in Python:

import requests

api_key = "YOUR_API_KEY"
url = "https://example.com"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

data = {
    "url": url
}

response = requests.post("https://indexnow.org/index", headers=headers, json=data)

if response.status_code == 201:
    print("URL submitted for indexing successfully")
else:
    print("Error submitting URL for indexing")
Enter fullscreen mode Exit fullscreen mode

Step 6: AI Content Generation with Groq Free Tier

To generate high-quality content, I integrated the Groq free tier. Groq offers a generous free tier that allows you to generate up to 100 content pieces per month, which is perfect for small businesses or solo entrepreneurs. Here's an example of how you can use the Groq API in Node.js:

const axios = require("axios");

const apiKey = "YOUR_API_KEY";
const contentType = "article";
const topic = "Your topic";

const headers = {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json"
}

const data = {
    "type": contentType,
    "topic": topic
}

axios.post("https://api.groq.com/v1/content", data, { headers })
    .then(response => {
        if (response.status === 201) {
            console.log("Content generated successfully")
        } else {
            console.log("Error generating content")
        }
    })
    .catch(error => {
        console.error(error)
    })
Enter fullscreen mode Exit fullscreen mode

Step 7: Scheduling with GitHub Actions

To schedule my marketing automation tasks, I integrated GitHub Actions. GitHub Actions allows you to programmatically schedule tasks, which is essential for automating marketing efforts. Here's an example of how you can use GitHub Actions to schedule a task:

name: Schedule Marketing Task

on:
  schedule:
    - cron: 0 0 * * *

jobs:
  marketing-task:
    runs-on: ubuntu-latest
    steps:
      - name: Run marketing task
        run: |
          # Your marketing task code here
Enter fullscreen mode Exit fullscreen mode

Wrapping Up

In conclusion, building a $0 marketing engine using only free API tiers is possible. By integrating the Dev.to API, Brevo free tier, Google Search Console API, Telegram Bot API, IndexNow, Groq free tier, and GitHub Actions, you can automate content distribution, email marketing, SEO optimization, notifications, instant indexing, AI content generation, and scheduling. Remember to always check the API rate limits and plan your marketing strategy accordingly.

Resources


Liked this article? If you want to take your workflow to the next level, check out SaaS Launch Blueprint ($49) -- Complete playbook to build, launch & scale your SaaS to $10K MRR.

Follow me for more practical guides on AI, automation, and developer productivity.

Top comments (0)