Google Sheets to WordPress Custom Post Types with REST API

  Рет қаралды 4,270

Moxet Khan

Moxet Khan

Күн бұрын

Last time we made an API to show Google Sheet records in our #Wordpress website using #JetEngine REST API but today we will directly insert our sheet data as CPT or CCT in Wordpress.
Google Apps Script:
softemblems.com/google-sheets...
Topics:
00:00:00 Introduction & Demo
00:01:35 Creating Custom Post Types
00:02:25 Insert CPT using Postman
00:04:33 REST API Authorization
00:05:50 Google App Script Code
00:09:00 Setup Trigger
Download #Elementor:
elementor.com/?ref=16401
Download #Crocoblock:
crocoblock.com/?ref=4088
Need to build dynamic websites?
softemblems.com
Track: Peruvian Woods - Dave Osorio [Audio Library Release]
Music provided by Audio Library Plus
Watch: • Peruvian Woods - Dave Osorio | Free B...
Free Download / Stream: alplus.io/peruvian-woods

Пікірлер: 131
@mihaiciobanu01
@mihaiciobanu01 6 ай бұрын
This is awesome, please do more of these tutorials on JetEngine, i think you are one of the best devs on this topic. Cheers!
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Thank you, keep coming :)
@harzadventure
@harzadventure 6 ай бұрын
Great tutorial, as always. You show the real power of JetEngine, thank you so much and keep going. :)
@fatjay9402
@fatjay9402 6 ай бұрын
Perfect ! .. i will test this
@mochannel2482
@mochannel2482 6 ай бұрын
This is awesome, thank you
@visualmodo
@visualmodo 6 ай бұрын
Very good content :)
@AidanJoyce
@AidanJoyce 6 ай бұрын
Excellent video and instruction - Thank you for sharing.
@digwillhachi
@digwillhachi 6 ай бұрын
your tutorials are great, so useful and nothing else like them.
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Thank you
@christiane-peschen
@christiane-peschen 6 ай бұрын
This is a great tutorial, would be great to see more posts like this in the future
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Sure, will cover them..
@dbx339
@dbx339 6 ай бұрын
awesome sir. keep it up
@AMIRHANOFF
@AMIRHANOFF 2 ай бұрын
How to add meta repeater field data so that it works without errors? I tried many options but it doesn't help
@sergioolivares
@sergioolivares 5 ай бұрын
Hello! How can I pass data as select field, or checkbox field instead of text field on JetEngine post types?
@darthjarjarthewise8051
@darthjarjarthewise8051 6 ай бұрын
Nice video as always! It would be nice if you could do a video how to optimize a WordPress website, especially a website with crocoblock plugins
@JodKapilakan
@JodKapilakan 6 ай бұрын
Thank you for the useful tutorial. A featured image tutorial would be nice
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
You can check these documentation for image stackoverflow.com/questions/63830915/read-images-from-system-or-url-using-google-apps-script-in-google-sheets-and-pos
@abdulhamid.469
@abdulhamid.469 6 ай бұрын
@Moxet Khan Great to learn something new.
@alfred1411
@alfred1411 2 ай бұрын
Great tutorial! I have a question. How I can add terms to the post from this sheet to WP? Thanks in advance for your answer.
@shahinulislam9304
@shahinulislam9304 6 ай бұрын
Claiming to make a complete tutorial from scratch.
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
complete tutorial for?
@shahinulislam9304
@shahinulislam9304 6 ай бұрын
@@MoxetKhanPK WordPress post will upload into Google Sheets same as this, please
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@shahinulislam9304 i already made it here kzbin.info/www/bejne/bH7IcmOnmc2fo6s
@guruttomanila
@guruttomanila 4 ай бұрын
Good Day Master Moxet, is it possible to use jetform builder vice versa? if you edit the fields via form , is there a possible way to sycnhronize post types and googlesheet? this googlesheet method is one of the best way to import or update post types, but what if i want to update post type via form, and it will also update the googlesheet data, if you have tutorials can you share it with us?
@CarlosMagnoSBomfim
@CarlosMagnoSBomfim 4 ай бұрын
Did anyone get it and could help me? I tried every possible way, in Postman it works perfectly, but when I switch to Google Sheet it doesn't work. Problem with the spreadsheet, it doesn't generate the Id or the Status, I've tried to configure it in different ways but I can't, I've been trying for a week and nothing, could anyone help me?
@casildahursan4985
@casildahursan4985 2 ай бұрын
Thank you very much, very useful! With the setup you show in the video, If you update or create a post (Lead) from WP will it be shown in GSheets? Thanx again
@MoxetKhanPK
@MoxetKhanPK 2 ай бұрын
Nope, its one way sync
@PauloSilvadg
@PauloSilvadg 3 ай бұрын
Excelente tutorial, me sirvió mucho. Sería genial un plugin que haga esa conexión. Pero como crear el postman mi propio? no entendi la integración con wordpress
@sabyasachide9190
@sabyasachide9190 6 ай бұрын
Can we connect over email? Have some custom project.
@ssaikat200
@ssaikat200 Ай бұрын
how to set the thumbnail image?
@CarlosMagnoSBomfim
@CarlosMagnoSBomfim 4 ай бұрын
Do I need to perform any other configuration to generate the ID via macro? Or add some other permission... Everything worked perfectly in Postman
@MoxetKhanPK
@MoxetKhanPK 4 ай бұрын
Make sure your code run onChange event so the time you type and leave the cell it will trigger the API and insert ID
@user-kd6gg9op8q
@user-kd6gg9op8q 6 ай бұрын
Thank you, brother Moxet Khan, for your excellent tutorials. I have a question for you: Is it possible to replace the date field used in JetFormBuilder with the bootstrap-datepicker or any other service so that it appears uniformly across all browsers? Thank you for your fantastic efforts!
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Yes possible but you need to contact crocoblock support to give you the right direction. Worst case scenario you can use jquery.
@juliangomezacevedo4657
@juliangomezacevedo4657 Ай бұрын
I love your tutorials, do you think is possible to do it with cct? maybe some advise on how to do it? thanks!
@MoxetKhanPK
@MoxetKhanPK Ай бұрын
Thank you, it has same concept, CCT also provides endpoints.
@AnthonyTilahun
@AnthonyTilahun 2 ай бұрын
What about other tabs inside of google sheet? How does that work? If I want to create a food menu and want to use cct and create another field with Food type or Drink type, and that field is a drop down selection, how would that work?
@MoxetKhanPK
@MoxetKhanPK 2 ай бұрын
As explained in 6:10 you can choose your sheet. You need to customize the code to meet your requirements.
@anthonyespino7214
@anthonyespino7214 5 ай бұрын
Hi friend. Greetings from Peru. You are big. I have a question. Can you relate to an author (user) from Google Sheets?, since said post has to be related to an author (user).
@KaifShaikhTaufiq
@KaifShaikhTaufiq 3 ай бұрын
I wanted to learn about hooks , how to create php functions like you did for enail code validation to update check , crocoblock the best way What source you would recommend me i know elementor , figma designs I am learning dyanmic features for wordpress using crocoblock
@stefaniacharitou
@stefaniacharitou 6 ай бұрын
Could this or something similar work with ACF fields in a CPT? I'm trying to create a verb conjugator, so verbs are my custom posts, and each post's content is full of ACF fields for all the different verb forms (I am, you are, he is, etc.).
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
It must work, i never used ACF with this sort of integration but the flow/mechanism is more or less same. They also use REST API.
@user-te1oi7pg6x
@user-te1oi7pg6x 22 күн бұрын
Hello Sir! Do we need to add 'post_' before each meta variable?
@MoxetKhanPK
@MoxetKhanPK 22 күн бұрын
Nope
@arielsegovia2313
@arielsegovia2313 Ай бұрын
Hello, I generated a formula to add 20% to a value but since it is not typed and it is a calculation, it does not take the update, that is, the value is never sent to the CPT, I tried typing a value in that box and there it is Send correctly, any idea what it could be?
@MoxetKhanPK
@MoxetKhanPK Ай бұрын
You need to change the trigger from change to save i guess.
@FuriosMind
@FuriosMind 3 ай бұрын
Hi, this works both ways? If I edit the post on wordpress he will update on gogle sheets?
@MoxetKhanPK
@MoxetKhanPK 3 ай бұрын
Nope, one sided
@fatjay9402
@fatjay9402 4 ай бұрын
@Moset Khan is it possible to load in allready made Wordpress post and Edit it with googlesheet so you can do it faster ?
@MoxetKhanPK
@MoxetKhanPK 4 ай бұрын
i don't see any benifits of importing wordpress to sheet, edit and publish it again unless it is a tabuler data. Yes it is possible..
@fatjay9402
@fatjay9402 4 ай бұрын
@@MoxetKhanPK Because for example i have a 2000 Posts that i need to update fields and ( put in info for the new felds ) and doing that manual takes around 5 - 10 mins per Post right now.. i was hoping to do it faster in google sheets and using maybe ChatGPT or something .. That why i am asking
@kevinwedin4293
@kevinwedin4293 6 ай бұрын
Thank you! Would you mind showing how to use other meta fields than textfield - say for example checkbox?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Well for each type we need to pass data accordingly, for example checkbox accept direct value, switcher should be true or false and date should be date format and so one. Please try sending meta["checkbox_meta"]="pre-set-check-box-value"
@kevinwedin4293
@kevinwedin4293 6 ай бұрын
Will try! Thanks! And...do you know a way to change the slug of the page with a column that is not Post Title? @@MoxetKhanPK
@kevinwedin4293
@kevinwedin4293 6 ай бұрын
Basicly - when the post title is the same for many posts I dont want it to be /marketingoffer2, /marketingoffer2 etc. So a way to easily customize it. Hope you understand what I mean :)
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@kevinwedin4293 Yes you can have unique slugs as per the documentation here. developer.wordpress.org/rest-api/reference/posts/#schema-slug
@kevinwedin4293
@kevinwedin4293 5 ай бұрын
So good thanks! Another question: I have created two CPT - "Education programs" and "Cities". So I have like 800 programs and 150 cities. Is there a way on the CPT for cities, when I create the single post template, to in the listing grid connect each "cities" that I have as a texonomy on the "educations" CPT? I know I could yous the cities taxonomy as a page - but I dont think its optimal in SEO-terms. @@MoxetKhanPK
@chunaksharora7463
@chunaksharora7463 4 ай бұрын
when im updating phone its says error 400. but when im inserting text in phone its updating but not updating with just numbers. why?
@chunaksharora7463
@chunaksharora7463 4 ай бұрын
got it the data type in google sheet for the number was numeric it should be plain text
@codemilestone7697
@codemilestone7697 6 ай бұрын
Please send full videos how to enbale also restAPI
@guruttomanila
@guruttomanila 4 ай бұрын
Do You have codes for CCT? tried using the code in CCT but cant able to run it, i change post_title to my CCT Title like sample_title
@MoxetKhanPK
@MoxetKhanPK 4 ай бұрын
There is one shared by Haxrat Bilal in Facebook group do check.
@guruttomanila
@guruttomanila 4 ай бұрын
can you send us a link for this group?@@MoxetKhanPK
@uminurlis
@uminurlis 5 ай бұрын
what if we want to add an image, and what code do we add in the app script. can you show and write the code please
@MoxetKhanPK
@MoxetKhanPK 5 ай бұрын
chatgpt and google is your friend, do a bit research and use base64 encoded image.
@uminurlis
@uminurlis 5 ай бұрын
@@MoxetKhanPK i don't have coding skill, i'm stil new in this, can you help me
@MoxetKhanPK
@MoxetKhanPK 5 ай бұрын
@@uminurlis you can send message on my fiverr to discuss in details
@kevinwedin4293
@kevinwedin4293 4 ай бұрын
I've made Meta Field for "date" in my CPT. But when typing the date in the Google Sheets, it does not happen anything with the Meta Field inside the post. Is there a specific way to write the date in Google Sheets to make it get in as a date? Thanks in advance.
@MoxetKhanPK
@MoxetKhanPK 4 ай бұрын
Parse date in code before sending it to wordpress in proper format. Most probabaly push it as string
@kevinwedin4293
@kevinwedin4293 4 ай бұрын
Hmm. What would that be for say 08/03/2024 (March 8 2024)?@@MoxetKhanPK
@kevinwedin4293
@kevinwedin4293 3 ай бұрын
@@MoxetKhanPK Hmm...Nothing happens when I push "2024-03-16" in Google sheets. Can't send picture here to show, do you have any reccomendation?
@SamWereb
@SamWereb 6 ай бұрын
02:53 and 06:12 Where do i find my endpoint URL? Is it the same as yours, but with my root domain name url?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Exactly! just change my website URL to yours and the CPT slug with yours, i am using leads as cpt you might have posts or something else.
@SamWereb
@SamWereb 6 ай бұрын
@@MoxetKhanPK Thank you!
@codemilestone7697
@codemilestone7697 6 ай бұрын
​@@MoxetKhanPK how I enable RestAPI and postman??
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@codemilestone7697 explained in first part of video
@codemilestone7697
@codemilestone7697 6 ай бұрын
@@MoxetKhanPK can you please send me the first part video link please?
@PROSIMSI
@PROSIMSI 6 ай бұрын
hi, its postible insert to CCT?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Same method, you need to change the endpoint url to your cct url.
@PROSIMSI
@PROSIMSI 6 ай бұрын
thanks, its amazing and save my time anf all my clients time
@PROSIMSI
@PROSIMSI 6 ай бұрын
@@MoxetKhanPK i have next question :) how delete cpt in WP if i delete row in google sheet?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@PROSIMSI custom code
@fatjay9402
@fatjay9402 4 ай бұрын
Sorry this is not clear... do i need postmade to use Google sheet , ?? Pls make better steps for what is whats ir feels like have of Infos are missing 😢 😢😢
@codemilestone7697
@codemilestone7697 6 ай бұрын
boss Brother Just boss
@user-oc7my8gl8z
@user-oc7my8gl8z 6 ай бұрын
Again Great Tutorial!! Question: Can we achieve this also with cct?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Same method, you need to change the endpoint url to your cct url.
@AnthonyTilahun
@AnthonyTilahun 21 күн бұрын
@@MoxetKhanPK This is not the same method, I've tried this several times with cct and the CCT value names are not the same, For Ex. You're not working with Post IDs, but rather _ID (ITEM ID), alot changes, a simple url swap for the endpoint doesn't work
@MoxetKhanPK
@MoxetKhanPK 21 күн бұрын
@@AnthonyTilahun You need to learn the logic, offcourse it can't be 100% same if the instances are not same.
@popopp2297
@popopp2297 6 ай бұрын
This is amazing! In App Script, what type of deployment do I need to select? There is 4 options: Web App, API Executable, Add-on and Library. Thank you for your training video.
@popopp2297
@popopp2297 6 ай бұрын
I figured out my question. A great addition to this video would be field mapping and how to build out your page or post with this data from a UI perspective.
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@popopp2297 That is the most simplest thing, once you transfer CPT from Google to Worpdress the rest of the methodology is similar, there are dozens of tutorial covers how to design the UI.
@MDABUSHAYDMOUDUDI
@MDABUSHAYDMOUDUDI 6 ай бұрын
Sir please making a video about create chatting function with jet engine.
@MoxetKhanPK
@MoxetKhanPK 5 ай бұрын
Already shared
@user-xb5zm6vy6n
@user-xb5zm6vy6n 6 ай бұрын
Can you do a video of dynamic function for jet engine thanks
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
What exactly you need in dynamic function?
@user-xb5zm6vy6n
@user-xb5zm6vy6n 6 ай бұрын
@@MoxetKhanPK I would like add a calculation function with meta fields or rest API fields values
@codemilestone7697
@codemilestone7697 6 ай бұрын
On How to connect with taxonomy like city ??
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Send city ID from your sheet
@codemilestone7697
@codemilestone7697 6 ай бұрын
@@MoxetKhanPK I already did with taxonomy id using Array but It's not working dynamically please can you help me?
@codemilestone7697
@codemilestone7697 6 ай бұрын
@@MoxetKhanPK if you want can I share you my code??
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
@@codemilestone7697 why array? You should pass integer value of term ID just like i did in this tutorial
@codemilestone7697
@codemilestone7697 6 ай бұрын
@@MoxetKhanPK its not working I did lots time on google sheet Apps script then I going to help Chat GPT and try to work like 3 days still not solve this issue can you please help me this one time my humble request please
@devonjordaan5181
@devonjordaan5181 3 ай бұрын
Hi, I followed the whole setup but for some reason its not working? How does the sheets connect to wordpress?
@MoxetKhanPK
@MoxetKhanPK 3 ай бұрын
It connects with REST API
@devonjordaan5181
@devonjordaan5181 3 ай бұрын
Hi, when I did all the things you did above its not connecting to the website. When I add something on the sheets the status shows "Failed: 404" I even created the same cpt as you and same metafields with same ID and everything. Do you maybe know why its doing that? @@MoxetKhanPK
@devonjordaan5181
@devonjordaan5181 3 ай бұрын
Hi, when I start adding items in sheets the table says Failed: 400 of Failed: 404. I added the exact same cpt as you with the same metafields and still its not working. When I use Postman it creates the posts but when i add to sheets after everything its not working? @@MoxetKhanPK
@devonjordaan5181
@devonjordaan5181 3 ай бұрын
Hi, I finally got it! It was my Jetengine fields that was corrupt for some reason. I now have another question, I am pushing data from zoho flow to sheets. So now sheets is not seeing the trigger "on edit" so its not publishing the posts... How can I somehow make the trigger run when flow pushes the data? @@MoxetKhanPK
@devonjordaan5181
@devonjordaan5181 3 ай бұрын
Moxet helped with this, thanks so much. Quick and reliable :)
@DavidMurrin77
@DavidMurrin77 6 ай бұрын
Can you also delete a post this way?
@MoxetKhanPK
@MoxetKhanPK 6 ай бұрын
Yes you can, you can follow this guideline wordpress.stackexchange.com/questions/400993/delete-request-using-wp-rest-api
@AlejandroLopez-dz4xn
@AlejandroLopez-dz4xn Ай бұрын
Thank you for your tutorial, but i believe your are missing an important thing, lets say you need to load a big chunk of data, how would you do it? as far as i understand, here you explain how to do it one by one, but when you have loads and loads of rows, this example its not really a good idea, is it?
@MoxetKhanPK
@MoxetKhanPK Ай бұрын
I know that, two solutions- the trigger should be changed to save and the code must be alter as well. Alternatively use free plugin if data is a lot.
@ib4112
@ib4112 6 ай бұрын
PErfect
@AnthonyTilahun
@AnthonyTilahun 22 күн бұрын
Why don't you link to postman?
@MoxetKhanPK
@MoxetKhanPK 22 күн бұрын
Why should i do?
@AnthonyTilahun
@AnthonyTilahun 21 күн бұрын
@@MoxetKhanPK Not to your post man link but just to the url itself, it would be helpful to those that are just beginning.
@MoxetKhanPK
@MoxetKhanPK 21 күн бұрын
@@AnthonyTilahun the video is not about postman
@unggulkirindi6556
@unggulkirindi6556 5 ай бұрын
It seems like a step in this tutorial is missing.
@MoxetKhanPK
@MoxetKhanPK 5 ай бұрын
Which is?
@unggulkirindi6556
@unggulkirindi6556 5 ай бұрын
@@MoxetKhanPK In the status column, Failed 404 / 403 appears. The ID in the Post ID field does not appear automatically. I've followed everything.
@MoxetKhanPK
@MoxetKhanPK 5 ай бұрын
@@unggulkirindi6556 403 mean you dont have enough permission or your REST API has error.
@CarlosMagnoSBomfim
@CarlosMagnoSBomfim 4 ай бұрын
Mine, after managing to activate the code and stop giving errors, I have the same problem, it doesn't generate the automatic ID and apparently it prevents the information from being passed to Wordpress. I already added Rest API authorizations anyway, but unfortunately it won't work.
@KaifShaikhTaufiq
@KaifShaikhTaufiq 3 ай бұрын
Hello there, why don’t you create a discord server and people with like minded can help each other
@CarlosMagnoSBomfim
@CarlosMagnoSBomfim 4 ай бұрын
Did anyone get it and could help me? I tried every possible way, in Postman it works perfectly, but when I switch to Google Sheet it doesn't work. Problem with the spreadsheet, it doesn't generate the Id or the Status, I've tried to configure it in different ways but I can't, I've been trying for a week and nothing, could anyone help me?
@AsadRafique-zw3ey
@AsadRafique-zw3ey 2 ай бұрын
Same Question From my side as well how Post ID and Status generated automatically ?
How to automate ACF & WP REST API: Google Sheet with Activepieces
19:28
Каха и суп
00:39
К-Media
Рет қаралды 2,4 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 3,8 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 525 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 54 МЛН
Подключаемся к API с помощью Google Sheets Apps Script
28:19
Алексей Куличевский
Рет қаралды 38 М.
Importing JetEngine Fields from a Google Sheets File
13:08
WP ByteMaster
Рет қаралды 26
Rest API - Best Practices - Design
15:50
High-Performance Programming
Рет қаралды 100 М.
Import Google Sheets To WordPress [Auto Sync]
12:46
Wicky Design
Рет қаралды 32 М.
WP REST API - Custom Post Types And Fields
8:04
Watch and Learn
Рет қаралды 29 М.
Tag her 🤭💞 #miniphone #smartphone #iphone #samsung #fyp
0:11
Pockify™
Рет қаралды 27 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,3 МЛН