Use-case: Complex Data Integration Birthday Sample
Scenario:
You want to display the upcoming birthdays of your staff. You want to include their names, birth dates, images, and some personalized messages.
Solution:
- First create your Google spreadsheet with the following columns and fill in the table with some sample data
Birth Date | Name | Picture | Age | Message |
---|---|---|---|---|
09.18 | Faith Edmundsss | https://img3.stockfresh.com/files/k/kurhan/m/91/390405_stock-photo-happy-woman.jpg | (22) | Faith! God bless you! |
10.09 | Victor Smith | https://thumb9.shutterstock.com/display_pic_with_logo/818215/558986872/stock-photo-single-handsome-muscular-black-man-with-shaved-head-folded-arms-and-cheerful-expression-558986872.jpg | (23) | Vick! God bless you! |
Example: here.
- Create a Google Script for handling the spreadsheet and create a trigger that will run the script automatically every day at 2 am
function myFunction() {
`ss = SpreadsheetApp.getActiveSpreadsheet(); sheet = ss.getSheetByName("Sheet1"); var d = new Date(); var month = '0' + (d.getMonth()+1); var day = d.getDate(); var range = sheet.getRange("A2"); var value = range.getValue(); var cellMonth = value.substring(0,2); var cellDay = value.substring(3,5); if (cellMonth == month && cellDay < day){`
sheet.deleteRow(2);
}
}
Here is documentation about GoogleScript.
- Publish your spreadsheet on the web and add it as a datasource into our system
You can find more information about these steps here.
- Create a new content and use the datasource elements to create the content to your own liking that will display your data
- You can use the image element to display images from your datasource
- You can use the text element to display texts from your datasource
With both elements you need to use the Datapicker function to select the row and column from your datasource
You can download and import a sample content from here.
- Test your content and fill it with actual information and data before using it in a live environment
- Maintain your spreadsheet daily and fill it with the upcoming birth dates