At TFC, we get a fair number of donations through ActBlue; in order to track donations and make sure we thank our donors in a timely fashion, we needed something better than manually pulling reports on an ad hoc basis.
This sounds like it shouldn’t be a big deal, but took a bit of investigation — typically, an engineer would have to set up a server with a publicly accessible endpoint. That endpoint would then forward data to relevant services. I’ll explain how we connected our ActBlue donations to our internal services without setting up a separate server.
If you work for a campaign or non-profit and rely on ActBlue, or just want a peek behind the scenes at TFC, read on.
At TFC, we are heavy users of Zapier for automating workflows. Unfortunately, there is no pre-existing integration of ActBlue with Zapier. The good news is, ActBlue has support for webhook callbacks that trigger on every donation. This callback includes data about the the donor and the contribution made.
That’s where Zapier comes in, which has integrations with a multitude of APIs. Zapier instances (called “Zaps”) can be configured to receive a trigger (e.g. a Google Sheet is updated), followed by some set of actions (e.g. send a Slack message). One of the trigger options is an HTTP endpoint.
Now when we receive a new ActBlue donation, it’s pushed into a master database, the donor is added to the right email list, and an automatic Slack message is created to alert TFC staff to the donation. That saves us a lot of time, and makes it easier to thank donors for their support.
To achieve the above, you’ll do the following high level steps in Zapier:
In Zapier:
In ActBlue:
Back in Zapier:
Note: CREDENTIALS here is the username/password credentials from above that have been base64 encoded. To get the base64 encoded version of your credentials, simply do the following in your terminal (on *nix based systems such as OS X, or Bash CLIs like Cygwin on Windows):
Continue in Zapier:
That’s it! You can now use this data to send Slack messages, update Google Drive files, add data to your email database, or more just by adding additional action steps to the Zap and using the output from step 3 (the above “code” section).