Skip to content
import sys
import urllib2
from fulcrum import Fulcrum
api_key = raw_input('api_key:')
form_id = raw_input('form_id:')
if api_key == '' or api_key == 'your_api_key' or form_id == '' or form_id == 'your_form_id':
sys.exit('api_key and form_id are required!')
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //
{
"classification_set": {
"name": "Agricultural Products",
"description": "A list of common agricultural products",
"items": [
{
"label": "cereals",
"value": "cereals",
"child_classifications": [
{
function doPost(e){
return handleResponse(e);
}
function handleResponse(e) {
var email = e.parameter.email;
var form = e.parameter.form;
var jsonString = e.postData.getDataAsString();
var payload = JSON.parse(jsonString);
var subject = "Fulcrum Webhook Payload";
import os
import urllib
import urllib2
import base64
import json
import sys
import argparse
try:
import requests
except ImportError:
<?php
$form_id = 'your-fulcrum-form-id-goes-here';
$email = 'me@gmail.com';
$input = file_get_contents('php://input'); # POST data from webhook
//$input = file_get_contents('payload.json'); # local file for testing
$webhook = json_decode($input, true);
# Webhook data
$webhookID = $webhook['id'];
#!/bin/bash
echo "File type (kmz or kml):"
read TYPE
echo "Enter the filename (without the .kmz or .kml extension) to process:"
read FILENAME
# Unzip KMZ file
if [[ $TYPE = "kmz" ]]; then
Unzip "$FILENAME.kmz"
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Leaflet Fullscreen Iframe</title>
</head>
<body>
// Special Apps Script function to process HTTP POST request
function doPost(e){
return handleResponse(e);
}
function handleResponse(e) {
// Parse JSON webhook payload
var jsonString = e.postData.getDataAsString();
var payload = JSON.parse(jsonString);
function deleteFromImgur() {
$.ajax({
url: "https://api.imgur.com/3/image/{id}",
type: "DELETE",
headers: {
"Authorization": "Client-ID YOUR-CLIEND-ID-GOES-HERE"
},
success: function(response) {
//console.log(response);
}
Something went wrong with that request. Please try again.