This section aims to help you getting started on how to set Meta Box meta data via Meta Box. Simply select one of your prefered automation manuals down below and start automating your WordPress website in no time.
This manual will demonstrate you on how to use the Flows feature of WP Webhooks to create an automation workflow (with multiple actions) directly on your WordPress website in combination with the Set meta data action.
To get started, we will walk you through each step from the beginning to the end so that you can make sure your endpoint will work as expected.
In order to use this webhook action, you need to make sure you installed and activated the following plugins, or have an active account with the given service:
To get started, please login into your WordPress website, navigate to your WordPress dashboard > WP Webhooks > Flows and open/create a Flow of your choice. If everything is ready, please follow the steps down below:
Add a trigger of your choice, configure it and continue the process. If you are unsure about how to do that, feel free to check out this manual.
If you plan on connecting this trigger with other services such as Zapier, Make (Integromat), IFTTT, Zoho Flows, etc. You can select those integrations from the trigger dropdown. If you want to learn more about our third-party integrations, feel free to take a look at our third-party integration page.
2. Add and configure the action
Add a new action within the Flow, select the Meta Box integration, and choose the Set meta data action.
After you selected the action as described above, it is time to configure the settings. If you don't feel completely familar with the layout of the Flow, you can read more about the basic setup of a Flow via the following helpfile.
Within those "Action Settings", you will see a list of all available arguments for the Set meta data action and further information about what the argument is about.
As seen in the example screenshot above, you can add multiple arguments. Each of those arguments has a different purpose and allows you to customize the data that will be sent. To see a full list, simply scroll down on this page to the argument list.
After that's done, simply continue the Flow action and test it. If everything works fine, you will get a successful response from the webhok call and everything was set up correctly. Within this Flow, you can also use all of the response values from the action call as parameters within the following actions.
Set the Flow status to active and save the flow.
In case of an error, please check its message for further information. We do also maintain a list of common error which you will find here.
If you followed all the steps above, your Flow will now send data based on its given trigger to the Set meta data action with the custom arguments you set up. In case you want to learn more about this setup and others, please visit our documentation.
To get started with WP Webhooks, simply download the latest version from your account dashboard and install/activate it on your WordPress website. If you want to lean more about the installation process of the plugin itself, please check out this manual.
2. Integrate the action with your service
In order to send data from your service to the Set meta data action, you need to provide an URL to your service so that it can send information over to WP Webhooks. As we provide automatically such receiving webhook URLs, you can simply copy it from within WP Webhooks.
Please head over to your WordPress dashboard > WP Webhooks > Receive Data > Set meta data and create/copy a webhook URL of your choice.
After that, you can add the copied URL from the "Receive Data" tab into the specified field of your service.
What we have accomplished so far: At this stage, your external service is already able to send data to your WordPress website via the previously generated URL. By default, our plugin can detect (and accepts) various Content-Types such as JSON and XML. We also suggest sending the requests as a POST request.
3. Set up Data Mapping
While the above connection can aleady transer data from your service to the Set meta data action, it won't do much as in most cases the data sent from your service has a different format than what WP Webhooks requires. To solve that, we offer a feature called Data Mapping. This allows you to automatically alter and map the incoming data from your service to map its values to the required arguments from WP Webhooks. This feature allows you to do various mapping possibilities, create new values and manipulate existing ones. To show you this feature in a practical way, down below is a short manual on how you can set up the data mapping template:
Set up a Data Mapping template
Go to your WordPress dashboard > Settings > WP Webhooks > Data Mapping and add a new Data Mapping template.
Within it, you can add your mapping data that adjusts the data sent by your service to the arguments required by WP Webhooks.
Lastly, you need to connect the Data Mapping template to the receiving URL you selected in step 1 (Setup your Webhooks). To do that, please head over to your WordPress dashboard > WP Webhooks > Receive Data and open the Setting of the specific webhook URL. There you will find a setting called Add request data mapping template - simply select your your Data Mapping template from the dropdown and save it.
Configure the Data Mapping template Now it is up to you what data you want to send in wich way to the Set meta data action. As for most of our actions, we offer something called Arguments which are similar to variables that you can use to assign data to a purpose. Below this box you will find a list of all available action arguments for the Set meta data action. Click here to jump direclty to it.
Go to your WordPress dashboard > WP Webhooks > Data Mapping and open the data mapping template you created in the previous step.
Within it, you can create your mapping based on the arguments from the argument list. Once you add a new row, you can add the argument into the left field.
On the right you can add keys to map the data based on the data that was sent by your service. To learn more about the mapping, please check out this helpfile.
Down below you will find a data mapping template example that shows a simple configuration on how to use it to manipulate values.
After the import, simply save the template. From there, you can head over to the preview (via the Preview template button) and see how the data mapping template is adjusting the data from the left side (which is the incoming data) to the mapped data (on the right).
Lastly, you only need to map the values sent by your service to the arguments available for this action. If you are unsure about the format the data is sent from your service, you have various options:
One possibility is to check the documentation of your service as they often document their payloads
If your payload is not documented, you can also use our Log feature. Once you sent a request from your service to the webhook URL, you will see an entry within the logs, including the data.
You can also send the data to a different webhook URL such as the one generated by https://webhook.site/.
If you followed the steps above, you successfully set up your webhook connection and connected the data mapping template. This is everything you need to automatically send data from your external service to the Set meta data action. In case you want to learn more about this setup and others, please visit our documentation.
"Set meta data" arguments
Our so-called arguments are values that you can use to customize your request. They allow you to send specific data to the Set meta data action which is then handled accordingly to the described purpose. You can use the arguments that you would like to send values for. To learn more about it, please see the Setup Guide above.
Object (post, term, user) ID. If you need to set value for an option (using MB Settings Page), object ID is the option name.
Update (or add) Meta Box meta keys/values.
Set a object type. For custom object types, use the args argument.
A JSON formatted string. Can be used for extra arguments for some object types or storages. More details at: https://docs.metabox.io/functions/rwmb-set-meta/
(String) Register a custom WordPress hook callback. The value will be called as followed: do_action( $yourdefinedaction, $action_return_data, $request_data )
Related blog posts
Make more out of the Set meta data action with our dedicated blog posts.