Sending Data from Bubble to WordPress
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. 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.
Introduction to the Tutorial
I'm Matt. I'm part of the Planet No-Co team. I'm a Bubble coach. 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 works really well. That's what I'm going to be demoing in this video.
Setting Up the WordPress Plugin
I've got this plugin installed and I'm on our website and I basically set up an automation. I set up a webhook. Remember, this will only work if you've got the webhook add-on installed from AutomatorWP. I'll say "Receive data from webhook" and this is going to generate a webhook location for me. I'm going to come back to that and then I'm going to go down to here and "Actions". You need to link the inbound data to a user because posts on WordPress have to have an author. I would say when the login, 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.
Creating a WordPress Post Action
And then... Oh, no, 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 I'll expand this open. I get all of the basic fields for creating a post. So let's begin to connect up WordPress and Bubble for WordPress to receive inbound data through the AutomatorWP webhook and publish it. Or we can even set it to drafts or review. We can do either with this.
Setting Up the Bubble API Connector
So I'm going to go into my Bubble app and go into the API Connect 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 it will 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.
Adding Sample Data
So for title, we'll say "How to generate thousands of blog posts with AI". And then the body, we'll 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.
Initializing the API Connection
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.
Finalizing the WordPress Setup
Or at least... Right, this is a mistake that I make often when using AutomatorWP 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. 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 "Save and Activate". And that then sets up this automation in WordPress ready to go.
Conclusion and Potential Applications
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 on OpenAI, you could generate literally thousands of blog posts with AI text generation. And you could publish them to one WordPress site or multiple WordPress sites using the... I've just demonstrated here, of using AutomatorWP with their webhook plugin to receive data into your WordPress app from Bubble.