Introduction
Sheetlabs is a platform that allows you to turn spreadsheets into powerful, well-documented APIs.
MoEngage <> Sheetlabs
Sheetlabs help you use Google Sheets as a simple CSM that can be then used to provide dynamic content for the campaigns you send out in MoEngage.
Integration
library_add_check |
Prerequisites
|
Step 1: Import your table in Sheetlabs
You can either import your Excel document or connect your Google Account to import Google Sheets.
On your Sheetlabs dashboard, go to Data Tables menu.
- To Import from your Google account, click on "Import from Google Sheets". You can then connect your Google account and grant Sheetlabs relevant permissions. Sheetlabs also provides an option to keep the data in your tables synced.
- To Import from CSV or Excel, click on "Import data table from CSV or Excel".
Step 2: Create an API in Sheetlabs
- On your Sheetlabs Dashboard, go to the APIs menu.
- Select the data table you want to create an API for.
- Give the API a name, and a description.
- You can set up GET API to fetch data and also write APIs to insert data.
Step 3: Configure MoEngage Content APIs
Use MoEngage Content APIs to add Sheetlabs as one of your feeds. You can add multiple APIs from Sheetlabs at the same time for each use case.
Setting up the API
info |
Information We've revamped our dashboard settings UI. Content API is now available in Settings -> Advanced Settings -> Content API in the revamped UI. For more information, refer to Summary of Changes - Settings UI Revamp. |
-
Navigate to Settings -> Advanced Settings -> Content API. Click + Add content API at the top right corner of the Content API screen.
Navigate to Settings >> APIs >> Content API. Click Add.
- Add your Sheetlabs API to the endpoint URL.
API URL
Once the API is set up, you can find its endpoint ("Base URL") on the API Details page:
- Enter the headers and parameters that you set up while configuring Sheetlabs. You can also use personalised values by typing "@".
- Click Save. Now, you will see your Sheetlabs API added in MoEngage.
Note - You can also test your APIs by clicking on the Test button. You can test your API response and validate.
Step 4: Fetch data using Content APIs in Campaigns
You can now use these content APIs in your campaigns. Read here to know more about Content APIs.
- On step 2 on your campaign creation, enter @.
- In the pop up, you can select the Content API configured in Step 2.
- You can use MoEngage Templating Language to parse through the API response and use the content in your campaigns.
Use MoEngage Connector Campaign to push data to your Sheets
To create a connector campaign on MoEngage,
1. Navigate to Create Campaign >> Connectors >> Custom and choose the delivery type most suitable to your needs
2. On step 2 of the campaign
Send data using SheetLabs API
To create a new record, use the POST
method and supply an array with one or more records in JSON format.
- Select the method as POST
- Add base URL as Webhook URL
- Select Body-type as "JSON" and add key-value pairs accordingly. Refer to the Sheetlabs documentation for more information.
Preview your request
At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available in Step 2 of Create Connector Campaign.
You can go ahead and Publish the campaign.