Marketing Automation With Rules And Events

Notice: This article is maintained for historical purposes. The Bixly Automate/Nebri OS platform that Bixly built, and this article features, is no longer available. Checkout Serverless Providers as an alternative.

As you know, there is a HUGE selection of Marketing Automation tools available. I am writing to show you a programmatic approach to accomplish similar results. Marketing automation tools are built for Marketers with MBA’s rather than hackers with an insight for marketing. This article is for the later.

Hackers as second class

Popular MA tools aren’t designed to help a programmer/hacker develop an automated marketing system. See Pardot’s (from Salesforce) advanced screen for creating rules. It’s point and click! That’s not what a programmer thinks of as programming. Many people have asked themselves this question in response: Isn’t it possible to easily control my marketing tools with a few scripts? Answer: NO! Well, not without a tool like Nebri. Some marketing tools allow it, like Google Adwords, where you can add your own JavaScript to control things. That’s great, but there’s also quit a big downside. Those rules only work on Adwords.

Why not create rules that react to events across ANY system with an API? That’s exactly what a programmer needs, and exactly where Nebri fits in.

Hackers as first class

How does it work?

  1. First find the tool that you want to connect to. Analytics, CRM, Email, whatever.
  2. Find a Pypi package (or make a connector) to install on your Free Nebri Instance for that tool.
    1. Analytics Package as an example
  3. Write a script, on a timer, that pulls data into Nebri
  4. Write a rules script to react to this data

With very few Python scripts you can begin automating your marketing.

Example Marketing Automation Scripts

After importing the above linked package to your instance, you will want to import it, and then schedule a daily retrieval. This will generate a KVP in your Nebri instance, and the world opens up from there!

import googleanalytics as ga

class analytics_import(NebriOS):
    schedule = "0 0 * * *" # daily

    def check(self):
        return True

    def action(self):
        accounts = ga.authenticate()
        profile = accounts[0].webproperties[0].profile
        self.pageviews = profile.core.query('pageviews').range('yesterday').value
            #this creates a KVP

Now that Nebri knows how many page views we have, lets react to it. In this example we are simply sending an email when a threshold is reached.

class trigger_advertising_investigation(NebriOS):
    listens_to = ['pageviews']

    def check(self):
        return self.pageviews > 1000

    def action(self):
        send_email(shared.marketing_team, "You have a crap load of visitors! Figure out what campaign is working.")

You could just as easily connect to your Google Adwords account (via the API) and trigger a change, or any API you like, and trigger a notification, launch a process and so on.

Benefits of Programming This Automation

  • You don’t have to know the full system to implement a single rule.
  • You don’t have replace any system to start building in automation
  • Nebri won’t demand that everything goes through it
  • For a decent programmer, the above scripts are much easier than using large enterprise “solutions”.