Given the folder's ID (Parent ID) and the filename, upload file to Google Drive.
Google Drive
Copy this URL into Tableau's Web Data Connector input:
https://t.blockspring.com/pkpp1233/upload-file-to-google-drive
Finish the setup steps to use Upload File in Tableau.
Finish the setup steps to use Upload File in Slack.
Run this function with a POST request to Blockspring.
Visit the node.js quickstart to get started fast.
Visit the php quickstart to get started fast.
Visit the python quickstart to get started fast.
Visit the ruby quickstart to get started fast.
Visit the r quickstart to get started fast.
Visit the javascript quickstart to get started fast.
Use this URL for webhooks. You'll want to make a POST request.
echo "{ \"_blockspring_spec\": true, \"filename\": , \"parent_id\": , \"google_token\": , \"file\": }" | curl -H "Content-Type: application/json" -d @- "https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?"
var fs = require("fs");
var blockspring = require("blockspring");
blockspring.runParsed("upload-file-to-google-drive", { "_blockspring_spec": true, "filename": , "parent_id": , google_token: , "file": }, function(res) {
console.log(res.params);
});
var fs = require("fs");
var request = require("request");
request.post({
url: "https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?",
form: { "_blockspring_spec": true, "filename": , "parent_id": , google_token: , "file": }
},
function(err, response, body) {
console.log(JSON.parse(body));
});
<?php
$url = 'https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?';
$data = json_encode(array( "_blockspring_spec" => true, "filename" => , "parent_id" => , "google_token" => , "file" => ));
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => array("Accept: application/json", "Content-Type: application/json"),
'method' => 'POST',
'content' => $data,
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
var_dump(json_decode($result));
?>
<?php
require('blockspring.php');
var_dump(Blockspring::runParsed("upload-file-to-google-drive", array("_blockspring_spec" => true, "filename" => , "parent_id" => , "google_token" => , "file" => ))->params);
import base64
import json
import urllib2
req = urllib2.Request(" https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?")
req.add_header('Content-Type', 'application/json')
data = {"_blockspring_spec": True, "filename": , "parent_id": , "google_token": , "file": }
results = urllib2.urlopen(req, json.dumps(data)).read()
print json.loads(results)
import blockspring
import json
import base64
print blockspring.runParsed("upload-file-to-google-drive", { "_blockspring_spec": True, "filename": , "parent_id": , "google_token": , "file": }).params
require 'base64'
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?', JSON.dump({ "_blockspring_spec" => true, "filename" => , "parent_id" => , "google_token" => , "file" => }), :content_type => :json
puts JSON.load(response)
require 'base64'
require 'blockspring'
puts Blockspring.runParsed("upload-file-to-google-drive", { "_blockspring_spec" => true, "filename" => , "parent_id" => , "google_token" => , "file" => } ).params
require 'base64'
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?', JSON.dump({ "_blockspring_spec" => true, "filename" = , "parent_id" = , "google_token" = , "file" = }), :content_type => :json
puts JSON.load(response)
library('blockspring')
library('rjson')
library('RCurl')
print(blockspringRunParsed("upload-file-to-google-drive", list("_blockspring_spec" = TRUE, "filename" = , "parent_id" = , "google_token" = , "file" = ) )$params)
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdn.blockspring.com/blockspring.js"></script>
<script>
blockspring.runParsed("upload-file-to-google-drive", { "filename": , "parent_id": , google_token: }, { "api_key": "" }, function(res){
console.log(res.params);
})
</script>
https://run.blockspring.com/api_v2/blocks/upload-file-to-google-drive?
Finish the setup steps to use Upload File in Code.