
How to Duplicate a Script - Sync Banks
Learn how to manage and duplicate all the scripts related to the app
In this guide, we'll learn how to manage and sync webhooks using Google Sheets and Google Apps Script. This process involves duplicating scripts, creating new projects, and setting up web app deployments. By following these steps, you can efficiently track and update your webhooks, ensuring smooth data synchronization across various sheets and accounts.
Let's get started
All right, moving on to the all webhooks script. Let's start by duplicating the first script. I suggest using this viable all webhooks to keep track of all the webhooks you're using.
Let's say the first script is already open. You can open it from here, as well. What I'm doing is syncing all the data from viable sheet onto this modernizing processes sheet. I'm using this sheet to import data for the chart of accounts, the bank for the BR, and the accrual sheet. I suggest you first create a new Google script. You can do that by typing scripts, script.google.com
Click "Enter," then "New Project." Simply copy the entire script, paste it, and save.

From this sheet open the first script in cell A2 Or click on the link below


I suggest you rename the scripts immediately so you don't forget their locations.

I would rename this to "SOP Viable Bank Sync," for example.

I suggest creating a new sheet or, even better, duplicating the existing sheet named SOP and replacing the scripts.



This way, you can keep track of all the sheets and scripts for all clients. This is useful in case you need to make any changes in the future. The next step is to duplicate this and make a copy, naming it SOP Bank/COA Sheet.



I would select the drive where I want this to be. I would choose "duplicating SOP" and make a copy.


Now I'm going to close the original because we don't need it anymore. As you can see, from the slash D to the next backslash, you have the sheet ID. Copy that sheet ID and go into the script. On the first line, let me add a comment.


Here, paste the sheet ID. Next, go to deploy, click on new deployment, and enable deployment types. Click on the settings gear icon and select web app.








It will ask you to authorize. You should allow this.



Here is the web app URL. Copy it and go to the viable team.


Now that you are in the viable team, go to the add ML panel. Click on the last button block to sync bank accounts. Click the back button block. Here, you will see the sync bank accounts button. Edit the action, go into the trigger webhook, and paste the URL we just generated.







If you didn't copy the URL or want to get it again, go to "Manage Deployments" and copy the web app URL.


Copy and paste. And you're done with this. If I now click on "Sync Bank Accounts," you'll see that in this sheet, it will write the bank accounts again.






Sync your bank accounts.

From here just test the webhook as it should work and add data to the duplicated sheet.

Once you are done, go to Sheet 1. Open the BR sheet and change the import range.





Here, the import range ID would make a copy of the BR sheet.




Make a copy.



The chart of accounts and the bank row ID should come from this sheet. Copy the sheet ID again and paste it into the import range.






Now, I'll get the import range from the SOP bank COA. I'll do the same for the accrual sheet. I hope this was helpful.

