custom GPT prompt

 avatar
unknown
plain_text
a year ago
1.6 kB
9
Indexable
I need a Google Apps Script code that performs the following:
1. Trigger Function: The function should be triggered whenever a cell is edited in a Google Sheet.
2. Sheet and Column Identification:
    * Specify the sheet name where the action should occur: [Sheet Name]
    * Specify the column number where the checkbox or trigger value is located (e.g., Column G): [Column Number]
3. Checkbox Handling:
    * The script should check the value of the cell in the specified column.
    * If the checkbox is in a different format (e.g., text instead of a boolean), specify what value represents true and false (e.g., "Sent" for true and "Not Sent" for false): [Value for True], [Value for False]
4. Data Collection:
    * When the checkbox is checked (or the trigger value matches the specified condition), the script should collect data from the entire row.
    * Prepare the data in a specific format (e.g., JSON) to be sent to a webhook.
5. Webhook Integration:
    * Insert the webhook URL where the data should be sent: [Webhook URL]
    * The script should send the collected data to this webhook URL via a POST request.
6. Error Handling:
    * Implement error handling to log errors if something goes wrong during the execution.
Generate the Google Apps Script code with the following details:
1. Sheet Name: [Sheet Name]
2. Column Number: [Column Number]
3. Value for True: [Value for True]
4. Value for False: [Value for False]
5. Webhook URL: [Webhook URL]
Ensure the code includes logging to help with debugging and correctly handles the checkbox format and data submission.
Editor is loading...
Leave a Comment