This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and creates an event. You can choose the description of the event, it's date/time & duration and the user it should be assigned to. | |
You can use curly bracket templating to insert any {{value}} from the FLG 360 webhook, for example {{data1}}. | |
For the event duration setting, use this notation: | |
* ```15m``` (15 minutes) | |
* ```2h``` (2 hours) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and creates a task. You can choose the description of the task, its due date/time and the user it should be assigned to. | |
You can use curly bracket templating to insert any {{value}} from the FLG 360 webhook, for example {{data1}}. | |
*/ | |
var settings = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and copies the lead (usually into another lead group). | |
By default the copied lead is identical, but you can change how data is saved using 'Extra Field Mappings'. | |
For example, to save ```data1``` into ```data2``` on the copied lead, use: | |
{ | |
"data2": "{{data1}}" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and creates a new client in FreshBooks **only if** a client with the same email address doesn't already exist. | |
If no email address is held in FLG 360, nothing will happen. | |
*/ | |
if (request.body.email) { | |
// First check if the client already exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First we fetch the logo that we'll embed in the email | |
http.get({ uri: 'https://s3-eu-west-1.amazonaws.com/torpio-logos/torpio_wide_560.png', encoding: null }, function (error, response, body) { | |
if (error || response.statusCode !== 200) { | |
log.error(error, response, body); | |
} else { | |
// Gather some values that we'll use in our email templates | |
var values = { | |
name: 'Fred', | |
from: 'Me' | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and creates a lead in any [VICIDIAL](http://www.vicidial.org) dialer (as long as it's accessible over the internet). | |
By default, the lead's title, name, address and main phone number are sent across to the dialer, but you | |
can map more fields using 'Extra Field Mappings'. For example, to map a dialer field ```mortgageamount``` | |
to FLG 360's ```data5``` field, use: | |
{ | |
"mortgageamount": "{{data5}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and updates the same lead based on the values received. | |
For example, to update the field ```data1``` with the date/time of the webhook, you might use a field mapping like this: | |
{ | |
"data1": "{{eventdatetime}}" | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script receives a webhook from FLG 360 and creates a record in any dialer based on DXI. These include: | |
- [Difference Dialer](http://www.differencecorp.com/products-and-services/dialler-technology/) | |
- [Easycallnow](http://www.easycallnow.net) | |
By default, the lead's name, address and phone number(s) are sent across to the dialer, but you | |
can map more fields using 'Extra Field Mappings'. For example, to map a dialer field ```mortgageamount``` | |
to FLG 360's ```data5``` field, use: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var settings = {}; | |
// Torpio will only merge opportunities that have this tag. | |
settings.INSIGHTLY_TAG = 'merge' | |
// The full merge URL copied from your WebMerge account | |
settings.MERGE_URL = 'https://www.webmerge.me/merge/12345/iqtabg' | |
function fetch(url, key, n, data, ok) { | |
n--; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CoffeeScript | |
### | |
This script receives a webhook from FLG 360 and adds the lead's email address to MailChimp. Here's how to use: | |
1. In FLG 360, go to 'Settings > Lead Groups > Lead Types > Edit' and add a webhook to this script's webhook URL (below) on any event ('Received' for example). | |
2. Type in your MailChimp list name (case sensitive). | |
3. Authorize your MailChimp account by clicking the red 'Authorize' button. | |
4. All done, switch the script on and trigger the event in FLG 360 to make sure it works. |
NewerOlder