Deluge is a scripting language specifically designed for the Zoho ecosystem. It stands for Data Enriched Language for the Universal Grid Environment and is tailored to help users automate tasks and customize applications across Zoho's suite of products. Read more about Deluge.
Deluge Custom Scripts for Conditions
How to add the Deluge script for Trigger Email:
To add a custom script for Trigger Email:
Navigate to Builder > Hub > Triggers and click the CREATE Trigger Emails
Click the ADD CONDITON button at the top-right corner.
![](https://help.zoho.com/galleryDocuments/edbsn00b0e43ac7625c00bfbd445a3286f7bc3e6885d8d38d2dace7ccf8b87925ff35f3bc2217cbf179aebd7b4de21357417c?inline=true)
Click If and select Deluge script Snippet.
Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
Add your sender email address and other necessary fields to the email settings for triggering the email when the custom script condition returns True.
How to add a Deluge script for the Survey End Page logic
To add a custom script for Survey End page logic:
Navigate to Builder > Settings > Survey End page and click Add Logic.
Click If and select Deluge script Snippet from the dropdown.
Add the custom script required to run the end page logic. You can also test run the code to ensure the logic works.
In the Default Flow, select the page to redirect to when the custom script logic works.
Click SAVE at the bottom of the page to confirm the changes.
Deluge Custom Scripts for Piping
The Deluge custom script can be used for piping in the Survey End page and Survey Disqualification page
How to add Deluge script in Survey End Page:
In the Survey End page, the Deluge script can be used for piping in two places, namely in the custom message and in the redirect to a new page.
Custom Message
To add a custom script for a custom message in the Survey End page:
Go to Builder>Settings>Survey End Page, and click on Add Logic.
Click If, scroll down, and select DelugeScript Snippet.
Add the custom script required for piping and test run the code to ensure it works.
Choose the desired action when the piping works under the then section.
Click SAVE.
Re-direct to a New Page
To add a custom script to Re-direct to a New Page in the Survey End Page, follow the steps below:
Go to Builder>Settings>Survey End Page, and scroll down to the Default end page section. Then choose the Redirect to a new page option.
Then click on the Insert Variable icon, scroll down, and select Deluge Script snippet.
Add the custom script required for piping and test run the code to ensure it works. If it works, click SAVE.
Add the piping parameter to the URL to which the survey should redirect, and click SAVE.
How to add Deluge script for survey disqualification page
In the Survey Disqualification page, the Deluge script can be used for piping in two places, namely in the custom message and in redirect to a new page.
Custom Message
To add a custom script for a Custom Message in the Survey Disqualification Page, follow the steps below:
Navigate to Builder > Settings > Survey Disqualification page, and choose the Custom Message option.
Click Insert Variable, scroll down, and choose Deluge Script Snippet.
Add the custom script required for piping in the window that opens and test run the code to ensure it works.
Click SAVE.
Re-direct to a New Page
To add a custom script to Re-direct to a New Page in the Survey Disqualification Page, follow the steps below:
Navigate to Builder > Settings > Survey Disqualification page, and select the Redirect to a new page option.
Click the Insert Variable icon, scroll down, and select Delugescript Snippet.
![](https://help.zoho.com/galleryDocuments/edbsn0323d279715f46197223981bd823c2edc0057f10c713d433136d5fb79dcd97009fb7e248e593fb427be6a62f4c4d342c?inline=true)
In the window that opens, add the custom script required for piping and test run the code to ensure it works. If it works, click SAVE.
Add the piping parameter to the URL to which the survey should redirect, then click SAVE.
Deluge Custom Scripts for Integrations
How to add a Deluge script for Webhook:
Follow the steps below for adding a Deluge script for Webhook integrations:
- Navigate to Builder > Hub > Triggers and click the CREATE button for Webhook.
![](https://help.zoho.com/galleryDocuments/edbsn0ca94bfbc03baf7a0769f049dd4f083ddde3921fd5d5c20982950976ea3bf1774a9cc5029b7437d643da8790b1c1bbbb?inline=true)
- Provide a name for the Webhook and add the POST URL.
![](https://help.zoho.com/galleryDocuments/edbsnb79817d7b96e3199b94836cf88899b1e572fef5eec1b13f4c77e94a7383ca0b77267e809b7251dc39847dcff5b772670?inline=true)
- In the Request Body, enter a name for the key.
- Add the VALUE by scrolling down and selecting Deluge Script from the custom script options
![](https://help.zoho.com/galleryDocuments/edbsn08d6ad662534bbcdac2644c07a97d178be9bdd012af1531070b5dc16880bbb1b0add8226917d4f0f212f7e1ad1975b03?inline=true)
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
- Add the query parameter, also using a custom script if required.
- Add the Header details and click SAVE.
How to add a Deluge script for Power BI:
Follow the steps below for adding a Deluge script for Power BI integrations:
- Navigate to Builder > Hub > Integrations and click the CREATE button for Power BI.
![](https://help.zoho.com/galleryDocuments/edbsn7651d3bd27ba059f85d287c3ffd713e80389f009ff82457b795e1fbacb04c8eae767149d5c744ae43cb13d4ef6716c2d?inline=true)
- Provide a name for the Power BI and add the POST URL
![](https://help.zoho.com/galleryDocuments/edbsnda6c23d288a1e4d187c10ff5018b806888564bce9f52bbb1ab0177f109381d79a1002c827798b48fd05efa6222b2bc03?inline=true)
- In the Request Body, enter a name for the key. Scroll down and select Javascript from the custom script options.
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
- Click SAVE.
How to add a Deluge script for Zoho CRM:
Follow the steps below for adding a Deluge script for Zoho CRM
- Navigate to Builder > Hub > Integrations and click the INTEGRATE button on Zoho CRM.
![](https://help.zoho.com/galleryDocuments/edbsn6437ba86b614afc9afb7f666645e993f8db9e60c00f07e5875d925813cc6589f39db0ffb789108d7e9b0d388ec278ff7?inline=true)
- Select the environment you wish to pass the responses to, then click NEXT.
![](https://help.zoho.com/galleryDocuments/edbsn5713f4b668d380b4b7303c37b31b00bea5aaad665deaba03ff74958d2350ddb28f12c39109e336fd04b76daa17224c54?inline=true)
- Select the CRM modules from which values should be passed to Zoho survey, using the dropdown button.
![](https://help.zoho.com/galleryDocuments/edbsn6eab95d465eb266da8781246069dfad3ca605779c825dfadfde4089dad6c0db49da95ac2586bd1667a350b182777b449?inline=true)
- Select the type of action that needs to be performed. Under the value to be passed on, scroll down and select Deluge Script from the custom script options.
![](https://help.zoho.com/galleryDocuments/edbsnc130d60af462fdc2eba13a31205f38cabe4de519dd6686f954e9fd86bdf469ca2c63cb220e0cb352aa906981ef409e57?inline=true)
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
- Click SAVE.
How to add a Deluge script for Zoho Recruit
- Navigate to Builder > Hub > Integrations and click the INTEGRATE button on Zoho Recruit.
![](https://help.zoho.com/galleryDocuments/edbsn2fa67cebafc0e70fb8d8535de0c6fe71104812724f691a22981c12c5309ee138ffd1848a14b616fff75db3a30cda8051?inline=true)
- Select the MODULES you wish to pass the responses, then click NEXT.
![](https://help.zoho.com/galleryDocuments/edbsn500ffdb2353a273a597e0fd4236030c1d95eb611342d66c6cd98707bfa8bd7552d459c994aaa3cccbc5480d22e74712c?inline=true)
- Select the type of action that needs to be performed. Under the value to be passed on, scroll down and select Deluge Script from the custom script options.
![](https://help.zoho.com/galleryDocuments/edbsn71cc332e36f3a27160ee4b251a08285d370387a51ac2ebd2febe9193c84f839ca8537ccadf5a05dc793e14ff52a3c68c?inline=true)
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
- Click SAVE.
How to add a Deluge script for Google Sheets
Follow the steps below for adding a Deluge script for Google Sheets:
- Navigate to Builder > Hub > Integrations and click the INTEGRATE button on Google Sheets.
![](https://help.zoho.com/galleryDocuments/edbsn177a1956239b59a233dd7db0c068ae1216f4b6c8274a59f24bd86d92c2b0d926ee1519978035e2df84349190e83720e3?inline=true)
- Select the spreadsheet and questions that need to be integrated and click NEXT.
![](https://help.zoho.com/galleryDocuments/edbsn4686f52fbc07e3c386b199f63e0893748de07b6f7ab05b5ab5e99db8d0359de0e977c04049e99540948f61d207fbb124?inline=true)
- In the Google Sheet integration page, click the + button.
![](https://help.zoho.com/galleryDocuments/edbsnf6c3dbaa1d4680df005fd4a3105fd6a31a2f4100f3289b934776b0166ea0ad7cbff2df4732f096200a5222fbc0ac674a?inline=true)
- Under Select question, scroll down and select Deluge script from the custom script options.
![](https://help.zoho.com/galleryDocuments/edbsn690cf1f992d935304bb27f3d726708b17e4970efe9ac81f711d147c1ca774ab4321e3d7be47da5efc277b3598fa3a969?inline=true)
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
![](https://help.zoho.com/galleryDocuments/edbsnefa8f2c00f4a89b68d2099d95c73db817e3ab1a87a03d78bdc6747d23838859e0b490f0e2e397a99a3515e105012f50f?inline=true)
- Click SAVE
How to add a Deluge script for Zoho Sheets
Follow the steps below for adding a Deluge script for Zoho Sheets:
- Navigate to Builder > Hub > Integrations and click the INTEGRATE button on Zoho Sheets.
![](https://help.zoho.com/galleryDocuments/edbsn3ee7cce9ba2349f4e4b8d1dbeb9ae2cf41f2f36a7ebee963d6b82c61c0b27456581a9a6b0a3d73425d4c4fd346391136?inline=true)
- Select the spreadsheet and questions that need to be integrated and click NEXT.
![](https://help.zoho.com/galleryDocuments/edbsn4b202b5d88b972efbf6f40742937c5dc352b7cf7d128eedcee63d51b13820804a51ad4452b90b97eaa788811d64021a8?inline=true)
- In the Zoho Sheet integration page, click the + button. Depending on the number of questions, you may need to scroll down.
![](https://help.zoho.com/galleryDocuments/edbsn4f23fccfc29a03ba3a5f1fda6f42807de24815998ab0cf63bb4166aca921d09c8182da7e63a4beffb2fd20108d5e06ca?inline=true)
- Under Select question, scroll down and select Deluge script from the custom script options.
![](https://help.zoho.com/galleryDocuments/edbsn80add072cdc9586cd3bdcf11afa34cec34a9ebb892d2bb1621963bce523b3c49e9d41d643a2ba5d4d02de96095b26d4e?inline=true)
- Add the custom script required to run the required logic. You can also test run the code to ensure the logic works.
![](https://help.zoho.com/galleryDocuments/edbsnc5bc411f8d62dbec4e9955c3b8ad98b796c67c96afc32e298a1cb867d1c59eee93998a95d12d0ef77b188f32d927b327?inline=true)
- Click SAVE
Points To Note
The following keywords are restricted to be saved in Deluge :
sendmail | posttochat | zoho | integration |
Sample Reference
A sample reference Deluge script snippet code demonstrating a simple condition using an if statement.
The provided Deluge code snippet demonstrates a simple condition using an if statement.
This code snippet checks a specific response value and returns true if it matches the string 'Single'.
if(application.get('survey').get('question').get('C').get('response') == 'Single' )
{
return true;
}
Note: