Ask a question
In this Bubble tutorial video, I'm going to show you how you can send data from your Bubble app to a WordPress site. This can have a whole multitude of really useful functions. One being, what if you were to generate AI content using Bubble and OpenAI? Check out our videos on OpenAI if you want to get started with Bubble and OpenAI and you generate content in your Bubble app and you send it through and you create really high ranking SEO content and you publish it to a WordPress site, you publish it to a WordPress blog from your Bubble app. Well, this is how you can go about it.
Learning Bubble.io
I'm Matt. I'm part of the Planet NoCo team. I'm a Bubble coach and I also have spent over a decade working with WordPress. I would say I love WordPress and Bubble equally. To get this going, you're going to need to purchase a plugin that allows inbound webhooks into WordPress. I've used AutomatorWP and their webhook add-on before and I found that that works really well and that's what I'm going to be demoing in this video. But if you're learning Bubble and you want to find even more Bubble tutorial videos, some which you cannot find on our YouTube channel, you can only find them at planetnocode.com and become a member to gain full access to our library of over 200 Bubble tutorial videos.
AutomatorWP Wordpress plugin
So I've got this plugin installed and I'm on our website and I've basically set up an automation. And so I've set up a webhook. Remember this will only work if you've got the Webhook add-on installed from AutomatorWP. and then I'll say "receive data from webhook" and this is going to generate a web book location for me. Now I'm going to come back to that and then I'm going to go down to here and "Actions". So you need to link the inbound data to a user because posts on WordPress have to have an author. So I would say when the login, so like the username, and then I would create a user of like an author type specifically for receiving these inbound posts and you'd put the user's username in there. Save. And then let's... oh no no no I don't want to add in a filter. Add in an action and I can go for a WordPress action and I can create a post. And then if I expand this open I get all of the basic fields for creating a post. So So let's begin to connect up WordPress and Bubble for WordPress to receive inbound data through the Automated WP webhook and publish it. Or we can even set it to drafts or review. We can do either with this.
Bubble API Connector to WordPress
So I'm going to go into my Bubble app and go into the API Connector and add in a new API and I'll call this one WordPress. And then I'm going to add in a call and it will be post because I'm sending data. If I go back to my WordPress site, I'm going to copy this URL, paste it in, and then start adding in parameters. So we'll have title, these aren't private because I want to be able to access these from within a workflow, and let's also just have a body. Keep it simple and so for title we'll say "how to generate thousands of blog posts with AI" and then the body will just say "this is an amazing blog post for SEO created in Bubble and published to WordPress.
Okay, now if I go back into here I'm going to say get samples and this now sets up the webhook to be ready to receive data into it. So I'll go back to Bubble and I'll hit initialize. Okay, I get a success from the Bubble API connector and the plugin in WordPress has detected the fields, the parameters that I've sent through. So I'll say "use these fields" and it's detected that they're both text and that then means that in AutomatorWP I can link in the data that I've received from the webhook, or at least... Ah, right, this is a mistake that I make often when using Automated WP is there are lots of save buttons everywhere. I have to save it. That's why I couldn't access the right data in the dynamic field. There we go.
Wordpress post automation
So title, content, and then there's all the standard parameters I can add in, such as status, gives you the options here whether you want to review them or not. But basically that's all you would need to do and then click Save and activate and that then sets up this automation in WordPress ready to go.
So there you have it, that's one way of sending data from your Bubble app to a WordPress site and this has got huge potential when combined with OpenAI because you could generate, using a Bubble app and OpenAI, you could generate literally thousands of blog post with AI text generation and you could publish them to one WordPress site or multiple WordPress sites using what I've just demonstrated here of using AutomatorWP with their WordPress plugin to receive data into your WordPress app from Bubble.