api,google-apps-script,gmail,quota , How to real-time monitor the emails?

How to real-time monitor the emails?


Tag: api,google-apps-script,gmail,quota

Good day! I want to offer the implementation of google apps to my company. Also we have a need to reply on messages, that we recieve through our web-site in 10 minutes time limit. For this purpose our big team of sales managers a handling emails when they have a free time. So i want to write the script (web application) that will indicate all the income emails with countdown. Every sales manager could click on email and reply on it from web interface.

I wrote the program, that every 5 sec. take all the emails from special label (all these emails are drops in this label-folder). And when smbdy replies on it - it moves to another label.

But after couple of hours i receive the message that i am above the quota. As i see the daily qouta to read-write operations is 20 000k.

Is any ability to solve my problem? Increas quota? or maybe there are any another possibilities to monitor emails in real-time. Thank You!


The Gmail API recently added push notifications via the google cloud pub/sub service. I wrote an example script on how to do this is Google Apps Script. You can view the code at:



square connect api batch processing

I need assistance with batch processing, especially in adding tax codes to items. I'm experimenting with the square batch processing feature and my sample cases are create 2 items and add the tax code to them. In all 4 requests - 2 for creating item, 2 to 'put' the tax...

How to get each track of a playlist with the Soundcloud API?

I am working with the Soundcloud API to create a custom playlist (another look than the original Soundcloud player). See image below. I am develop a website for an artist. With the API of Soundcloud I want to import his music from Soundcloud to the website. There are different tabs...

IOS Use Core Data Only in Specific Parts of an app

I'm new to Core Data and trying to use it for persisting objects for offline support in an app communicating with JSON Back-end. I was using NSObjects for my models and now use NSManagedObjects. I only need to save these server objects in a few parts of the app, and...

REST API with token based authentication

I want to develop a web site with AngularJS. On the backend side I will use Codeigniter REST framework. I have some security issues and I don't want to start developing without fixing them on my mind. I don't want to use something like api key because it will be...

Instagram API Comments Created using Python (ERROR: AttributeError)

Hello I trying out Instagram API using python and I am new to it. Hope you guys could take a look at it & help me out. I am wondering how to collect the date & time from users that have commented for each media id. I have tried using...

Google Apps Script - Sharing outside of domain

So I have followed the tutorial here, and everything works great... for me. google forms file upload complete example What I need to do is add the script to a Google Form, and allow users to upload an image along with the form. I know it will only put it...

Retrieving values from a php service in HTML

I am trying to build a website that displays a google map with a user location (lat/long) from a php service that I wrote. I already have a php script that gets the lat/long from a mobile app (via POST from the client), stores it in a DB, and read...

How to make the Twitter API returns me over 800 tweets

How to make the Twitter API (home_timeline) returns me over 800 tweets? For example applications like tweetbot how do it to have more updates in the 3000 home timeline? I think that using a cache system but which one?

How to compare voice command input by user to hard coded strings

I am currently working on an app that takes user input by voice command. The program recognizes the words using the google api. I want to be able to compare the user voice input to hard coded strings. My problem is that I do not know how to code this...

How to get the last entry containing a certain value in Google Spreadsheet

I have an answer spreadsheet linked to a Google form. I wish to get the last date that and answer was submitted. Lets say I my entries look like this : DATA : A B 1 Date String 2 2015-05-09 Abb 3 2015-05-11 Bcc 4 2015-05-12 Cdd 5 2015-05-20 Bcc...

How to POST - API in thingspeak.comusing urllib in Python

I am working on a project where I have to get data from a website and then post it to a different website. At the moment I am still new, so I am using a thingspeak.com account to experiment on posting, and I am also following the same example used...

CORS, Client vs. Server & Rails API GET Request

I've built a GET Rails API that checks for an access token and that the registered request.env["HTTP_X_REAL_IP"] matches the IP address that is registered within the admin panel of the app. Example request: https://staging.mysite.com/api/v1/products?access_token=7b9f3cddd3914a6f45fa692997fe6dc9 The API works great when I'm making requests from a server by curling the request or...

Google Webmaster API - Mark crawlerros as fixed

While marking the crawl-errors as fixed via the API, I got an 403 error „Insufficient Permission“. If I only read the erros via the api, I got no errors. I’m the owner of the site and I logged with my google webmaster credentials. I've created the API creditals with the...

API Integration

Im new here and Im not a programmer but learning along the way. I have come up against a problem but in your explanation (if any - thanks) dont presume that I know. Hope you can help me solve this. Here are the details: Im trying to integrate Interpire EmailMarketer...

Google Spreadsheet (Using named range in script)

Trying to get my script to use a named range. In that range I am trying to reset the cell colors back to white. I keep getting an object error, can't figure out how to make this work. function resetCheckDirectory() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var tableRange = ss.getRangeByName("rangename"); tableRange.setBackgrounds("#FFF");...

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)

i have taken this code from https://github.com/davidadamojr/TextRank and i am facing this problem. i tried to solve by placing utf-8 in "keyphrases = decode('utf-8').extractKeyphrases(text)" but failed. here is the code: """ From this paper: http://acl.ldc.upenn.edu/acl2004/emnlp/pdf/Mihalcea.pdf External dependencies: nltk, numpy, networkx Based on https://gist.github.com/voidfiles/1646117 """ import nltk import itertools from operator...

Using Graph API Explorer gets friends list but my own app doesn't . (Graph API Explorer token v.s App Token)

I am trying to get my friends list in my app. If I use the access token in my Graph API Explorer console and hit the url. https://graph.facebook.com/v2.3/me?access_token='GraphAPIToken'. I am able to get the complete friends list. If I try using the SDK or any library like fbgraph for nodejs...

Removing Alert When Using DeleteFile API

I'm writing a VBA application which involves looping a large number of directories recursively. I am using the FindFirstFile API to to achieve this, as it offers a substantial performance boost over the FileSystemObject. In order to remove the FSO from my code entirely, I need a routine to delete...

Ruby on Rails posting to an API using javascript via a proxy

I'm very new to Ruby on Rails and I'm hoping this will be a quick fix. I have a very simple form (firstname, surname, email) that needs to post XML to an API on another domain. Everything on our site is clientside javascript so I would like to post to...

Use higher API level in android with an external library

Would it be possible to import an external library (.jar file) in an android project containing the features of API level 21, and then use them in my application with a minimum sdk version set to say like 17? I'm really into Matierial Design but as Google states, "To use...

Output Google Spreadsheet to XML/RSS/Atom using Google AppScript Content Service

So I've searched this site and found nothing really useful so far to accomplish this. I am wanting to turn a spreadsheet into an RSS feed using google script content service. How do I declare column values (i.e. pubDate, Author, Content) so it will output correct RSS/Atom feed. Following their...

Google Spreadsheet custom function to add csv in spreadsheet

I am using Google spreadsheets, and in my google spreadsheet i want to import data from my RESTful web service. I cant use =IMPORTDATA due to the fact that i need to add a header to the url for auth purposes. This is the custom function i have so far:...

Blockchain receive API with same address

I need to accept bitcoins on my website (PHP). I'm using blockchain and i have read the api: https://blockchain.info/api/api_receive Is quite simple but i have some questions, but first i will try to explain what i need. Client send bitcoins to my wallet (Any amount they want) Server will be...

REST api : correctly ask for an action

I'm currently working on a REST api. I've read a few times how to handle endpoints the right way, using the protocol (post, put, ...) to define which action should be made. Let's say I have a list of quotes. I have : a GET endpoint /quotes that let me...

Merging Multiple Arrays Evenly/Alternating with Javascript and Google AppScript

I'm trying to merge multiple arrays evenly/alternating in javascript/Google appScript. There are several arrays (5 or 6). I've tried 2 different methods, but neither worked. I don't work a lot with javascript honestly and I've managed to get the code to this point, but I can't get it merge properly;...

Stuck with nested serializer using Django Rest Framework and default user

The models and serializers are described in the pastebin: http://pastebin.com/ZxzxWY7V In my database I have a user which also has a member profile and a set of credentials attached to it. Now... when I run this as is and try to pull a user using the AuthUserModelSerializer I get the...

Reverse GeoCoordinate Class gives Location Not found error

i m using google Reverse Geocoding API in my app, i m succussfully able to get get coordinate using google geolocation API. Now i m trying to get Location Name from Reverse Geocoding API , but always returns Location not found error here is my code: Geocoder geocoder= new Geocoder(MainActivity.this,...

Google Form to Document Merge to Pdf to Mail

I think my issue is in the e.values I am using along with the ('keyXXXXX', XXXXX); that I am using. The original code I used was something I borrowed from TJ Houston's site. I am using it for an application process. I wrote the code following the process of using...

Get column to display month name Google App Script

How do I set a column to display the name of the month instead of the whole date using the script? The function can manually be performed by selecting Format>Number>August in the menu but I want to do this in code. This is what I've tried but I can't seem...

Unique Entity Error message

I have a user entity which have some unique fields. The code bellow shows you how I defined it. /** * @UniqueEntity(fields={"login"}, message="UNIQUE ERROR MESSAGE") */ ...... /** * @var string * * @ORM\Column(name="login", type="string", length=255, unique=true) */ private $login; Developping an API, I would like to be able to...

getJSON from Google Apps Script not working in Safari

I've created this piece of code to handle my user login. var gasUrl = "https://script.google.com/macros/s/[my id]/exec"; function submitFormData() { var username = $("#inputEmail").val(); var password = $("#inputPassword").val(); $.getJSON(gasUrl + "?username=" + username + "&password=" + password, function(data) { if(data[0]) { localStorage.setItem("username", data[0].username); localStorage.setItem("id", data[0].id); window.location.href = "/index.php"; } else {...

REST-API Different Content-Type on Error Response

Since some weeks I'm working on an rest api using spring-mvc. The REST-API is working properly and I`m almost done until one last problem when it comes to error handling with specific error-objects. The REST-API is using JSON as format to serialize Java-Objects. When an error occurs during service-execution an...

Inbox api use them to tag relevant mails just like inboxsdk.com

I tried using newly released Inbox api to sort out and tag my mails, but I am stuck at categorising mails after I had successfully logged in using api.

Return value -Java API design VS. C API

I used C a lot before and now use Java. I have a question of API design in JAVA. In C, I always use int as a meaningful return value, and put multiple objects(some of which will be changed) in arguments. e.g, int foo(int x, int y, int *result) {...

Link to another resource in a REST API: by its ID, or by its URL?

I am creating some APIs using apiary, so the language used is JSON. Let's assume I need to represent this resource: { "id" : 9, "name" : "test", "customer_id" : 12, "user_id" : 1, "store_id" : 3, "notes" : "Lorem ipsum example long text" } Is it correct to refer...

Apache Nutch REST api

I'm trying to launch a crawl via the rest api. A crawl starts with injecting urls. Using a chrome developer tool "Advanced Rest Client" I'm trying to build this POST payload up but the response I get is a 400 Bad Request. POST - http://localhost:8081/job/create Payload { "crawl-id":"crawl-01", "type":"INJECT", "config-id":"default",...

PHPUnit: Testing RestFul API with die response

I am trying to PHPUnit test an action in my ZF2 project. The APIs return a JSON string using die($jsonObject). This causes the PHPUnit test to stop processing and just die a JSON response. public function testStartupAction() { $this->dispatch('/api/v3/startup', "POST", array()); $this->assertJson('{"status":false,"message":"Please enter the UID","data":null}'); } assetJson method is never...

Access dropdown items in Google App Scripts UiApp

I'm using the older depreciated UiApp class in javascript (because I have to) where I have a dropdown list I need to access the ListBox, and see all the values that it contains. Is there a way to do this? All the items must be present because there is method...

How to save Facebook private message to database? [on hold]

My question is that is possible save private message from facebook to my database. And if yes, how is it possible? Thank you.

Is there any way to find out when an album got added to spotify with the web api?

My usecase is to present the latest added album of an artist (regardless of releasedate). I use the https://api.spotify.com/v1/artists/[artistId]/albums to get the albums but I can't find any information about how the response is ordered. Is it random or actually sorted by the date the album got added to spotify?...

how to put a location name programmatically in Google JS autocomplete API and get the results?

When searching for Edinburgh napier university using google autocomplete API, I don't get the state and city, which should be scotland and edinburgh. I want that if the result doesn't include city and state, it takes the postal town name (which in our case is edinbrugh) and search for the...

Google Sheets API for clickable images in Google Sheets

In Google sheets, you can insert a clickable image to a cell which links to a function in app script. Can we also insert this clickable image and link it to app script from our server using Google Spreadsheet API? Or Can we call app script from our server? https://developers.google.com/apps-script/guides/menus#clickable_images_and_drawings_in_google_sheets...

Django update without required fields

I'm trying to execute an update through my API. When I push an update, I do not have all the required fields, because I'm only trying to update the ones that have changed. I get a 400 "This field is required." error. I know the field is required, but I'm...

Break Google Apps HTMLService Page into multiple .html files

I want to combine a few related HTMLService interface in to a tabbed page. I can get the tabs working using the code here. But I want to put the page for each Tab into a different html file in the project. How would I show Billets.html inside the div...

Pass webapp link parameter to html file in Google Apps Script

I am trying to pass a parameter from a webapp link, so it can be used to pre-fill an html form (using HtmlService). Apps Script - function doGet(e) { var formId = e.parameter.formId; return HtmlService.createTemplateFromFile('Index') .id = formId .evaluate() .setSandboxMode(HtmlService.SandboxMode.IFRAME) } Index.html - <form id="myForm"> <input type="text" name="formId" value="<?=id?>"><br> <input...

Ruby API Call Page Issue

This might be a basic issue but very common so it might be helpful to other people in the future. I use HTTParty to make a get request to an API, which returns some information, something like this: { datapath: "blah-blah.blah.blah", success: true, info: { row_limit: 500, total_results: 2700, total_pages:...

Hide referrer header in API request

I need to make requests to Google Translate Text-To-Speech API. I have an enabled key but keep getting blocked by No Access-Control-Allow-Origin. I've posted more about it here: Google Translate API - No Access Control Origin with Text to Speech The following sources, http://weston.ruter.net/2009/12/12/google-tts/ and Request to Google Text-To-Speech API...

Google Spreadsheet setBackgroundColors() “Deprecated”

A gs I have been using in the past to check for duplicates, is no longer working. The script would check all cells in the spread sheet if any were identical it would highlight all their occurrences green. I also had another function that would revert all the cells back...

Javascript (Google Scripts) value from a function is not returning

I think could be a simple one to solve, I am stuck working this simple issue out. I have called a createEvent function to create a google calendar event. As part of this function I also get the google calendar event ID as EventId and want to return it. For...

Give port number and passed parameters in WSO2

I am trying to learn WSO2 but have been stuck at a minor step which i believe should be quite easy to do. While creating a new api i need to give the production endpoint. What i want to give is the url along with the port as well. So...