{"id":20827404,"url":"https://github.com/mrrazvi/wordpress-servicebridge-hubspot-syncing","last_synced_at":"2026-04-29T05:33:37.818Z","repository":{"id":128130837,"uuid":"575453012","full_name":"MRRazvi/wordpress-servicebridge-hubspot-syncing","owner":"MRRazvi","description":"Providing syncing from ServiceBridge to HubSpot.","archived":false,"fork":false,"pushed_at":"2023-04-19T20:38:33.000Z","size":498,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T17:56:30.352Z","etag":null,"topics":["api","database","hubspot","php","servicebridge","syncing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MRRazvi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-07T14:47:49.000Z","updated_at":"2024-07-24T10:45:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2c17596-7724-429a-a48a-b48a973ec0e3","html_url":"https://github.com/MRRazvi/wordpress-servicebridge-hubspot-syncing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRRazvi%2Fwordpress-servicebridge-hubspot-syncing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRRazvi%2Fwordpress-servicebridge-hubspot-syncing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRRazvi%2Fwordpress-servicebridge-hubspot-syncing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRRazvi%2Fwordpress-servicebridge-hubspot-syncing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MRRazvi","download_url":"https://codeload.github.com/MRRazvi/wordpress-servicebridge-hubspot-syncing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243174986,"owners_count":20248376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","database","hubspot","php","servicebridge","syncing"],"created_at":"2024-11-17T23:12:01.491Z","updated_at":"2025-12-26T05:20:53.034Z","avatar_url":"https://github.com/MRRazvi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ServiceBridge HubSpot Syncing\n\nProviding syncing from [ServiceBridge](https://cloud.servicebridge.com) to [HubSpot](https://app.hubspot.com).\n\n# Prerequisites\n\n-   PHP 8.1\n-   MySQL\n-   Service Bridge Account (user id, user pass)\n-   HubSpot Account (api key)\n\n## Program Flow\n\nWe have 4 bots to do multiple things, and we will discuss them one by one.\n\n**sb:accounts**\n\n-   it will pick array of all the provided accounts\n-   insert into database for latter use\n\n**hs:owners**\n\n-   will go to hubspot api and pick all the owners\n-   insert into database for latter use\n\n**sb:sync**\n\n-   will pick all SB accounts from database\n-   loop through accounts one by one\n    -   pick all the estimates from SB api\n        -   check either we need to create or update the record in database\n        -   store estimate id, customer id, email, status, version, finish date, created and updated at\n        -   =\u003e for **synced** column check if there is change in version than the value will be false\n        -   =\u003e **scheduled_at** column value coming from finish date of estimate if not exist than won or lost date we will pick\n    -   pick all the work orders from SB api\n        -   do same as for estimates just estimate_id will replace work_order_id\n\n**hs:sync**\n\n-   sync estimates will run first\n    -   pick all the estimates from database where **synced is false** and tries are less than 3\n        -   go on estimate one by one\n            -   increment the try\n            -   get latest estimate data via **estimate_id** from database\n            -   check the status if not from our list (Finished, WonEstimate, LostEstimate) skip it otherwise move on\n            -   get customer data from HS api\n            -   get contact data from HS api\n            -   get service location from HS api\n            -   find latest job on that customer\n                -   pick all the estimates from database\n                -   pick all the work order from database\n                -   compare them on the basis of **scheduled_at**\n            -   create or update contact on HS api\n            -   search for deal\n            -   if we have deal than create or update it\n    -   same process for work orders but will skip the deal part\n\n## Setup\n\n```\ngit clone https://github.com/MRRazvi/servicebridge-hubspot-syncing.git\ncd servicebridge-hubspot-syncing\nmv .env.example .env\nphp artisan migrate:fresh\nphp artisan sb:accounts\nphp artisan hs:owners\nphp artisan sb:sync\nphp artisan hs:sync\n```\n\n-   In **.env** file you need to configure HubSpot api key\n\n-   In **app/Console/Commands/ServiceBridgeAccountsCommand.php** you need to configure array with your SB accounts\n    composer install.\n\n## Logs\n\nYou can see logs under **storage/logs**, individual for every bot.\n\n### Author\n\nMubashir Rasool Razvi  \n[Upwork](https://www.upwork.com/freelancers/mrrazvi)  \n[LinkedIn](https://www.linkedin.com/in/mrrazvi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrrazvi%2Fwordpress-servicebridge-hubspot-syncing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrrazvi%2Fwordpress-servicebridge-hubspot-syncing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrrazvi%2Fwordpress-servicebridge-hubspot-syncing/lists"}