Skip to main content

Hello,

tl;dr Is there a way to have Zapier read fields from custom post types in WordPress so I can map my airtable records to them?

I’m trying to create a solution for job postings for the HR dept of my company that automatically pushes Post Type: jobpost to WordPress via Create/Update posts for WordPress using a mostly automated airtable solution.

The functionality is HR user creates an airtable record, zapier creates a post that is of the type “jobpost” with specific parameters pre-defined in airtable and mapped in Zapier to a post.

However, Zapier reads the fields available to the base type of Post. but not of custom post type “jobpost”. And since I can’t map the airtable records to anything the zap fails because the mapping doesn’t exist.

I tried inspecting the source for fields and renaming fields to their WordPress source code div IDs. Job Title > post_title. Job description > post_content etc…

But this form of pseudo mapping didn’t work either.

Thank you.

Hi @Carlo_dev 

You may have to explore using the WordPress API via one of these actions.

 


I’m on it and i’ll report back. Thank you Troy.


edit: Credit to Troy for suggesting this approach.

I was able to make a successful API post to https://www.example-domain.com/wp-json/wp/v2/jobpost/ instead of the default/pre-configured https://www.example-domain.com/wp-json/wp/v2/posts/.

Then I rewrote the request to work within this post-type parameters and I was able to successfully post a jobpost via this endpoint.

I did specifically need to include:

"post_type": "{{post_type}}"

in the body of the request to get it to work even though I was hitting the jobpost endpoint specifically.

Currently don’t recommend using the Zapier AI request builder if you can avoid (I randomly sunk 30mins into it for no reason), just reference the WP REST-API docs and write your own request(s) and map your fields yourself.


That’s awesome @Carlo_dev! Thank you for sharing the solution here. This will be helpful to our other amazing Community members who might have a similar issue.

Happy Zapping!⚡️


Reply