This file contains 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
contact_data = zoho.crm.getRecordById("Contacts", contact_id); | |
owner_id = contact_data.get("Owner").get("id"); | |
user_response = zoho.crm.getRecordById("users", owner_id); | |
user_data = user_response.get("users").get(0); | |
timezone = user_data.get("time_zone"); | |
appointment_time = contact_data.get("Modified_Time"); | |
appointment_time_in_user_timezone = appointment_time.toDateTime("yyyy-MM-dd'T'HH:mm:ss").toString("MMM dd hh:mm a", timezone); | |
return appointment_time_in_user_timezone; |
This file contains 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
const userId = $Crm.user.id; | |
const userData = ZDK.Apps.CRM.Users.fetchById(userId); | |
let phoneNumber = userData._phone; | |
const twilioFromNumberRecords = ZDK.Apps.CRM.Twiliosmsextension0__Twilio_From_Numbers.searchByCriteria(`Owner:equals:${userId}`); | |
if (twilioFromNumberRecords.length > 0) { | |
phoneNumber = twilioFromNumberRecords[0]._Name; | |
} |
This file contains 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
sms_record = zoho.crm.getRecordById("twiliosmsextension0__Sent_SMS", sms_record_id); | |
if (sms_record.get("Message_Type").startsWith("out")) { | |
note_title = "Outbound SMS"; | |
note_content = "Outbound SMS sent by " + sms_record.get("Owner").get("name") + ": " + sms_record.get("Message"); | |
} else { | |
note_title = "Inbound SMS"; | |
note_content = "Inbound SMS received: " + sms_record.get("Message"); | |
} |
This file contains 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
config_map = configuration.toMap(); | |
template_id = config_map.get("template_id"); | |
to_email = config_map.get("to_email"); | |
subject = config_map.get("subject"); | |
from_name = config_map.get("from_name"); | |
from_email = config_map.get("from_email"); | |
module_name = config_map.get("module_name"); | |
record_id = config_map.get("record_id"); | |
org_email_address = config_map.get("org_email_address"); |
This file contains 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
inprogress_document_results = invokeurl | |
[ | |
url :"https://sign.zoho.com/api/v1/requests?request_status=inprogress" | |
type :GET | |
connection: "zohosignconnection" | |
]; | |
requests = inprogress_document_results.get("requests"); | |
unopened_documents = list(); | |
for each request in requests | |
{ |
This file contains 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
try | |
{ | |
if(error_message == null || error_message == "" || error_message.toString().length() < 5) | |
{ | |
return; | |
} | |
// Put your DSN here | |
dsn = "https://****@sentry.delugeonaluge.com/2"; | |
processed_dsn = dsn.replaceAll("https://","").replaceAll("@",""); | |
// Replace with the base URL (e.g. sentry.io/ ) |
This file contains 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
import { Dictionary } from './utility/Dictionary' | |
import { Secret } from '@aws-cdk/aws-secretsmanager' | |
import { LogDriver } from '@aws-cdk/aws-ecs' | |
import { LogGroup } from './constructs/LogGroup' | |
import { Alarm } from '@aws-cdk/aws-cloudwatch' | |
import { AwsAccount } from './OkraInfra' | |
import cdk = require('@aws-cdk/core') | |
import ec2 = require('@aws-cdk/aws-ec2') | |
import ecs = require('@aws-cdk/aws-ecs') | |
import ecs_patterns = require('@aws-cdk/aws-ecs-patterns') |
This file contains 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
import pyarrow | |
import pyarrow.parquet as pq | |
import signal | |
import tarfile | |
import sys | |
import boto3 | |
import io | |
import json | |
import re | |
import pandas as pd |
This file contains 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
const grafanaService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, 'Grafana', { | |
cluster: this.props.ecsCluster, | |
taskDefinition: taskdef, | |
domainZone: this.props.hostedZone, | |
domainName: this.grafanaDns, | |
publicLoadBalancer: true | |
}) | |
const sslListener = grafanaService.loadBalancer.addListener('SSL', { | |
port: 443, |
This file contains 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
function setupAutoTripTagging(parentStack: BackendAPIStack) { | |
const databaseUsernameSecret = new Secret(parentStack, 'databaseUsername'); | |
const databasePasswordSecret = new Secret(parentStack, 'databasePassword'); | |
const tripTaggingModelBucket = new Bucket(parentStack, 'gofar-auto-trip-tag-models'); | |
// sklearn etc. are MASSIVE and therefore exceed the lambda | |
// limit (250MB). We upload the dependencies to S3 instead and the lambda will pull it down | |
const rebuildModelDependencies = new Asset(parentStack, 'rebuildAutoTaggingModelLambdaDependencies', { | |
path: './handlers/auto_trip_tagging_model_builder/dist/lambda_dependencies.tar.gz' |