Documentation

Using Make to Sync Object Data with Google Sheets

Available 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:

  1. Sign in to Make, navigate to the Scenarios page, and click Create a new scenario.

    Click Create a new scenario.

  2. Click the Add button, select the Webhooks module, and choose the Custom webhook trigger.

    This runs the scenario when the webhook receives data.

    Select Webhooks.

    Select Custom webhook.

  3. Select the new module and click Add to generate a new webhook.

    Select the module and click Add.

  4. Once created, copy the generated webhook URL.

    Copy the generated webhook URL.

  5. 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.

    Define an action that sends a request to the webhook endpoint whenever an entry is added.

  6. Add a test Object entry to trigger the webhook.

    This allows the Webhooks module to determine the Object’s data structure automatically.

  7. Verify the module has successfully determined the Object’s data structure and click OK.

    Verify the Object's data structure was determined successfully.

    Note

    If the Object’s structure changes, return to editing the Webhooks module and click Redetermine data structure.

  8. Click the Add new module button, select the Google Sheets module, and choose the Add a row action.

    Select Google Sheets.

    Select Add a row.

  9. Select the new module and click Add to connect a Google account.

  10. 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.

    Add a Google connection.

    After granting Make permission, return to editing the Google Sheets module.

  11. Determine the module’s mode and then select the desired Spreadsheet and Sheet to sync with the Object.

  12. Indicate whether the selected Sheet includes headers.

  13. Map the Sheet’s columns to data fields in the Object’s structure. Available Object fields are provided by the Webhooks module.

    Map the Sheet's columns to Object fields.

  14. Turn on scheduling and save the scenario.

    Turn on scheduling.

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:

  1. Open Make, navigate to the Scenarios Page, and click Create a new scenario.

    Click Create a new scenario.

  2. 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 Google Sheets.

    Select Watch rows.

  3. Select the new module and click Add to connect a Google account.

  4. 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.

    Add a Google connection.

  5. Select the desired Spreadsheet and Sheet.

  6. 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.).

  7. Set the limit of results to be worked with during one execution cycle.

  8. Click OK when finished.

  9. Click the Add new module button, select the HTTP module, and choose the Make a Basic Auth request action.

    Select HTTP.

    Select Make a Basic Auth request.

    Important

    Basic 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).

  10. Select the new module and click Add to add basic authentication credentials.

  11. 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.

  12. Select the post method type.

    Add credentials, enter the Object's Headless API URL, and select the post method.

  13. Select the desired body type (e.g., RAW) and content type for the request (e.g., JSON).

  14. Enter the request body using the appropriate formatting for the selected content type and target Object.

    Select Make a Basic Auth request.

  15. Click OK.

  16. Turn on scheduling and save the scenario.

    Turn on scheduling and save the scenario.

    Note

    By default this scenario is automatically triggered every 15 minutes.