Using Make to Sync Object Data with Google Sheets
Liferay 7.4+
Here you’ll learn how to use webhooks to trigger sync tasks between Liferay Objects and Google Sheets using Make (formerly Integromat). Syncing your data in this way requires a Make account, Google Spreadsheet, and active DXP 7.4 instance. The DXP instance must also have a published Object with the desired fields for sending or receiving data to the Google Spreadsheet.
Syncing Object Data to a Google Sheet
Follow these steps to sync Object data to a Google Sheet:
-
Sign in to Make, navigate to the Scenarios page, and click Create a new scenario.
-
Click the Add button, select the Webhooks module, and choose the Custom webhook trigger.
This runs the scenario when the webhook receives data.
-
Select the new module and click Add to generate a new webhook.
-
Once created, copy the generated webhook URL.
-
In your Liferay instance, use the copied URL to define an Object action that sends a request to the webhook endpoint whenever a new Object entry is added.
-
Add a test Object entry to trigger the webhook.
This allows the Webhooks module to determine the Object’s data structure automatically.
-
Verify the module has successfully determined the Object’s data structure and click OK.
noteIf the Object’s structure changes, return to editing the Webhooks module and click Redetermine data structure.
-
Click the Add new module button, select the Google Sheets module, and choose the Add a row action.
-
Select the new module and click Add to connect a Google account.
-
Enter a connection name and click Save.
This opens a window for selecting the desired Google account and granting Make permission to access the account’s files.
After granting Make permission, return to editing the Google Sheets module.
-
Determine the module’s mode and then select the desired Spreadsheet and Sheet to sync with the Object.
-
Indicate whether the selected Sheet includes headers.
-
Map the Sheet’s columns to data fields in the Object’s structure. Available Object fields are provided by the Webhooks module.
-
Turn on scheduling and save the scenario.
Once saved, new Object entry data is added to the selected Sheet.
Syncing Sheet Data to an Object
Follow these steps to sync Google Sheet data to an Object:
-
Open Make, navigate to the Scenarios Page, and click Create a new scenario.
-
Click the Add button, select the Google Sheets module, and choose the Watch rows trigger.
This sets the module to watch for new rows in a Sheet.
-
Select the new module and click Add to connect a Google account.
-
Enter a connection name, click Save.
This opens a window for selecting the desired Google account and granting Make permission to access the account’s files.
-
Select the desired Spreadsheet and Sheet.
-
Indicate whether the selected Sheet includes headers and enter the range of columns to watch (e.g.,
A1:E1
sends data input on columns A through E.). -
Set the limit of results to be worked with during one execution cycle.
-
Click OK when finished.
-
Click the Add new module button, select the HTTP module, and choose the Make a Basic Auth request action.
importantBasic authentication is used for demonstration purposes only. Use a more secure authentication method for business use cases (e.g., Make an OAuth 2.0 request).
-
Select the new module and click Add to add basic authentication credentials.
-
Once added, enter the Object’s Headless API URL, which uses this format:
https://<your-domain>/o/c/<objectname>/
. See Headless Framework Integration for more information. -
Select the post method type.
-
Select the desired body type (e.g., RAW) and content type for the request (e.g., JSON).
-
Enter the request body using the appropriate formatting for the selected content type and target Object.
-
Click OK.
-
Turn on scheduling and save the scenario.
noteBy default this scenario is automatically triggered every 15 minutes.