This repository contains scripts to fetch real-time application data from EXPA (GIS) to Google Sheets using Google Apps Script.
Follow these steps to set up and run the scripts:
- Open your Google Sheet.
- Navigate to
Extensions
->Apps Script
. - Create two new script files:
iCX.gs
andoGX.gs
.
- Copy the code from the
iCX.gs
file in this repository and paste it into theiCX.gs
file in your Apps Script editor. - Copy the code from the
oGX.gs
file in this repository and paste it into theoGX.gs
file in your Apps Script editor.
- You can set your preferred start date for data extraction. Edit line 3 in both
iCX.gs
andoGX.gs
files:var startDate = "01/07/2023"; // Set your preferred start date
- Obtain an access token from EXPA. You may refer to this link for more details on how to obtain the token.
- Replace the placeholder with your actual access token in line 6 of both
iCX.gs
andoGX.gs
files:var accessToken = 'YOUR_ACCESS_TOKEN'; // Your access token
To ensure the data is fetched in real-time, set up triggers for the functions:
- Open the Apps Script editor.
- Click on the clock icon to open the triggers page.
- Add a new trigger:
- For
iCX.gs
, set the function toiCXExtract
. - For
oGX.gs
, set the function tooGXExtract
.
- For
- Set the event source to
Time-driven
. - Choose the frequency and interval (e.g., every hour).
To fetch data for all LCs in one file and distribute it:
- Use the
IMPORTANGE
andQUERY
functions in Google Sheets. - This will allow you to import specific data for each LC into different sheets.
- AIESEC International
- [AIESEC in Sri lanka]
Feel free to fork this repository, make changes, and create pull requests. Contributions are welcome!
Furthermore, It would be great if you could star our repository and encourgae our intiatives
With this setup, you should be able to integrate EXPA application data into Google Sheets seamlessly. If you encounter any issues or have questions, please open an issue in this repository or you may contact fouzul.hassan@aiesec.net