Created
July 7, 2017 20:14
-
-
Save NickDeckerDevs/8e512bc69da801dff88901e872722dda to your computer and use it in GitHub Desktop.
Quick writeup on how I would pull in data from a list of website pages and create them in hubspot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * this is a quick and dirty way of grabbing content from a website page and | |
| * putting it into hubspot. The best way would be to (php) curl into each page, | |
| * parse the web page using a regular expression for the | |
| * /<article(*.?)<\/article>/ | |
| * add them into your php object, then looping through that php object and | |
| * using the hubspot API to create and update the pages | |
| * | |
| * Ideally you could just loop through the XLS file (or csv if you prefer) | |
| * That way you could have some of the other data in the XLS file. But you | |
| * could also just copy a few of the columns out into a file and create a json | |
| * file to have that data in it... Really this is a matter of preference and | |
| * your end goal. | |
| * | |
| * https://developers.hubspot.com/docs/methods/pages/post_pages | |
| * Create your pages via the post_pages api endpoint. On your return, you will | |
| * parse the info to get your object id that was created. | |
| * Access-Control-Allow-Credentials →false | |
| * Connection →keep-alive | |
| * Content-Encoding →gzip | |
| * Content-Length →673 | |
| * Content-Type →application/json; charset=UTF-8 | |
| * Date →Fri, 07 Jul 2017 20:02:50 GMT | |
| * Vary →Accept-Encoding, User-Agent | |
| * x-hubspot-new-object-id →5243900246 | |
| * Take the object id above ^^^^^^^^^^ and use this api endpoint: | |
| * https://developers.hubspot.com/docs/methods/pages/put_pages_page_id | |
| * And add the content from your php object into the page. | |
| * | |
| * | |
| */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment