Using Elastic.io to Sync Object Data with Google Sheets¶
You can use Liferay Objects with data integration tools to create automated tasks for syncing Object data with external services. These tasks are triggered using webhooks and can connect to Google applications, Microsoft Office, and more.
Here you’ll learn how to use webhooks to trigger sync tasks between Liferay Objects and Google Sheets using Elastic.io. Syncing your data in this way requires an Elastic.io 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 Elastic.io, navigate to the Integrate page, and click Flows.
Click Add New Flow.
Click Add the Initial Trigger.
For the Trigger, select the Webhook component.
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 Webhook component to determine the Object’s data structure automatically.
Click the Send Sample Request button.
Verify the test successfully determined the Object’s data structure. If the data sent to the webhook URL is found, the step will show it was successful.
Click Add New Action.
For the Action, select the Google Sheets component.
Select the Add Spreadsheet Row function.
Select the desired Spreadsheet and Worksheet 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.
Click the Retrieve Sample from Google Spreadsheet button.
Verify the test was successful.
Click Publish Draft.
Click Start Flow to activate the new flow.