How to Setup App Script (New Row Added)
Strive Guide
28 steps
2 minutes
Strive
Apps Script
ChatGPT
Google Sheets
To view the sample prompt for ChatGPT and sample app script, check out this link: [Reference](https://drive.google.com/file/d/1C2TchspqXRii5pidngoDW-IKHR5OwBNY/view?usp=sharing) Do make change to the prompt and script according to your use case.
1
Navigate to [https://strive.asia/flowbuilder](https://strive.asia/flowbuilder)
2
Once you have setup the flow and save, it should show out the flowbuilder key.
3
Copy and paste the prompt into ChatGPT
4
Copy the App Script provided based on your use case.
5
Switch over to Google Sheet then click "Extensions" > "Apps Script"
6
Switch over to App Scrip then paste the copied script.
7
Update the flowbuilder key
8
Update the trigger column.
9
Update the field mapping. The left should be the header name and right is the variable name. Do ensure the header name is same with the name on the left side. The phone number variable name must be "phone".
10
Update the send test data variable name and value as needed. This function is to send test data to Strive.
11
Press [[cmd]] + [[s]] or [[ctrl]] + [[s]] to save the app script
12
Click "Triggers"
13
Click "Add Trigger"
14
Update the trigger as needed.
15
Click "Save" This is sample trigger setup for when new row is added via manual input or copy and paste. Note: The function name could be different depending on the script that you have copied.
16
It should show an authentication pop up. Click Allow to proceed.
17
Click "Editor"
18
Click on the dropdown then select on the function which is to send the test data.
19
Click "Run". At the bottom, there should be an execution log shown where it will display if it's successful or failed.
20
Switch over to Strive then click "Enrolment History"
21
It should show out the new enrolment.
22
If the enrolment wasn't shown, you can head over to App Script then press "Executions"
23
Click on the execution which is Failed to view more detail.
24
Example of reason why the execution failed.
25
If it's enrolment was successful, you can test by adding a new row in the Google Sheet.
26
Switch over to "Builder" then "Enrolment History" to view the new enrolment via adding new row in GSheet. If the enrolment is successful, you can proceed with the next step.
27
Click on "Builder" then click on the refresh icon at the top right to retrieve the variable from the App Script.
28
Click on the tag icon then scroll under Variables. It should display the variable of the GSheet so you can use it when send follow up, confirmation message or other action. You can continue to setup the flow after ensuring the variable is shown.
How to Setup App Script (New Row Added)
Strive Guide
28 steps
2 minutes
Strive
Apps Script
ChatGPT
Google Sheets
To view the sample prompt for ChatGPT and sample app script, check out this link: [Reference](https://drive.google.com/file/d/1C2TchspqXRii5pidngoDW-IKHR5OwBNY/view?usp=sharing) Do make change to the prompt and script according to your use case.
1
Navigate to [https://strive.asia/flowbuilder](https://strive.asia/flowbuilder)
2
Once you have setup the flow and save, it should show out the flowbuilder key.
3
Copy and paste the prompt into ChatGPT
4
Copy the App Script provided based on your use case.
5
Switch over to Google Sheet then click "Extensions" > "Apps Script"
6
Switch over to App Scrip then paste the copied script.
7
Update the flowbuilder key
8
Update the trigger column.
9
Update the field mapping. The left should be the header name and right is the variable name. Do ensure the header name is same with the name on the left side. The phone number variable name must be "phone".
10
Update the send test data variable name and value as needed. This function is to send test data to Strive.
11
Press [[cmd]] + [[s]] or [[ctrl]] + [[s]] to save the app script
12
Click "Triggers"
13
Click "Add Trigger"
14
Update the trigger as needed.
15
Click "Save" This is sample trigger setup for when new row is added via manual input or copy and paste. Note: The function name could be different depending on the script that you have copied.
16
It should show an authentication pop up. Click Allow to proceed.
17
Click "Editor"
18
Click on the dropdown then select on the function which is to send the test data.
19
Click "Run". At the bottom, there should be an execution log shown where it will display if it's successful or failed.
20
Switch over to Strive then click "Enrolment History"
21
It should show out the new enrolment.
22
If the enrolment wasn't shown, you can head over to App Script then press "Executions"
23
Click on the execution which is Failed to view more detail.
24
Example of reason why the execution failed.
25
If it's enrolment was successful, you can test by adding a new row in the Google Sheet.
26
Switch over to "Builder" then "Enrolment History" to view the new enrolment via adding new row in GSheet. If the enrolment is successful, you can proceed with the next step.
27
Click on "Builder" then click on the refresh icon at the top right to retrieve the variable from the App Script.
28
Click on the tag icon then scroll under Variables. It should display the variable of the GSheet so you can use it when send follow up, confirmation message or other action. You can continue to setup the flow after ensuring the variable is shown.