How to create a module to see google reviews

I am trying to create a module in hubspot to see my google reviews but i have several errors.

Does anyone know how I could do this step by step?I already have the API Key and the place_id of my company which is ChIJt-Il0XuGQQ0RiEmX8S9aqh0

Thank you so much

Hi, @JVallejo7 :waving_hand: Thanks for your question.

A simple step-by-step guide to create a module for displaying Google reviews:

  • Ensure API Key and Place ID: Confirm that your Google API Key and Place ID are correct and have the necessary permissions.
  • Handle CORS: The ERR_BLOCKED_BY_CLIENT error suggests CORS issues. Ensure your domain is allowed in the Google API Console.
  • Module Setup: In HubSpot, create a custom module and add fields for the API Key and Place ID.
  • Write Javascript: Fetch reviews with the Google Places API and display them. Check the browser’s developer console for any errors during testing.
  • Compliance: Make sure you’re following Google’s API usage limits and policies.

If you can provide the actual error messages or code snippets, it would be helpful to pinpoint the issue. And if you’re able to post an example of the embed code and any errors from the developer console, that would be great too. This can help our community members troubleshoot with you.

Have fun building! — Jaycee

It’s strange because when I try to access my reviews from the API I get an error that I don’t know how to solve, but when I access an external plugin, access to the reviews works perfectly.

https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJt-Il0XuGQQ0RiEmX8S9aqh0&key=MYAPIKEY

{
"error_message" : "The provided Place ID is no longer valid. Please refresh cached Place IDs as per https://developers.google.com/places/web-service/place-id#save-id",
"html_attributions" : [],
"status" : "NOT_FOUND"
}

There are these two threads about this issue on stackoverflow that have not been answered: 1 2