Re: Uploading Tasker data to Google Docs using HTTP POST

5,019 views
Skip to first unread message

Amer

unread,
Apr 27, 2013, 9:51:26 PM4/27/13
to tas...@googlegroups.com

This should be handy someday. Thx a lot ;)

▒ Android 4.2.2 @ Google neXus4™ ▒

On Apr 27, 2013 2:23 AM, "Patrick Young" <pat...@gmail.com> wrote:
I saw a couple of blog posts about how to do this using Tasker. Unfortunately, the Forms have since changed their ways to hide the formkey, and the URL that you get is different. I figured out how to get this working using the new forms version

Example - you make a form with 3 questions that are all Text input and the URL that you get is:

Change it to:

Use Chrome's element inspector (right click page) to find the textbox IDs. example for 3 text boxes:

entry.180688430
entry.319875373
entry.515205668

Create a new task in tasker - Net - HTTP Post

Server:Port
Path
forms/d/2gQEDNPO8Gb889Obt-qJ0HlK80vQajFUtRjnp_CB0_A/formResponse
Data / File
entry.180688430=%VAR1
entry.319875373=%VAR2
entry.515205668=%VAR3

Don't touch anything else for the task. %HTTPR should return 200 if done successfully. Your spreadsheet will now update with your tasker collected data :) I'm sure that you can figure out an innovative use for this given the power of Google Spreadsheets.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Scott Crowther

unread,
May 22, 2013, 6:17:29 AM5/22/13
to tas...@googlegroups.com
I should add that I consistently get a 400 %HTTPR result.
I gleaned that the issue could be that Tasker won't post via https, only via http.
How did you get round this?

On Tuesday, May 21, 2013 4:41:34 PM UTC+1, Scott Crowther wrote:
Thanks Patrick - I've tried this but failed to get any data written to my Google Drive spreadsheet.
I've used %BATT as the variable to populate each time at this point - I'm just trying to prove the passing of data to the spreadsheet first.

To confirm my steps:
1. setup google spreadsheet with form inputting 3 TEXT fields
2. captured the textbox IDs and form ID from the URL
3. populated tasker with correct server:port, path and data/file variable as above.

Any pointers on where might be going wrong? I have triple checked everything.

Thanks

scott

Mikesan

unread,
Aug 23, 2013, 3:46:11 PM8/23/13
to tas...@googlegroups.com
This was working fantastic for me, until today.  Do you know if google changed anything?

Jonathan Siegal

unread,
Nov 29, 2013, 7:02:27 PM11/29/13
to tas...@googlegroups.com
Just tried this today and it seems to be working fine.

Peter Baus

unread,
Jan 14, 2014, 4:14:41 PM1/14/14
to tas...@googlegroups.com
I had a problem too but I fixed it by setting all text fields to "Required".


Dňa sobota, 30. novembra 2013 1:02:27 UTC+1 Jonathan Siegal napísal(-a):

Don

unread,
May 30, 2014, 11:00:11 AM5/30/14
to tas...@googlegroups.com
Hi all - I wanted to post to thank everyone on this thread for their helpful information. I'm a big Tasker fan and being able to write data out to gDocs is huge for me.
I have a task running every morning to get weather, play some random inspirational speech and ask me how I slept. I'll write my sleep quality out to a gDoc and start figuring out how I can improve my sleep & quality of life.

Thank you, you all rock!

Phil Bilton

unread,
Jul 28, 2014, 6:29:33 PM7/28/14
to tas...@googlegroups.com
Hi, is there any way of getting the cell reference number in google docs while using my phone?
Can't seem to figure it out.
Thank you
Phil

Jeff Vanelle

unread,
Jan 9, 2015, 2:42:11 AM1/9/15
to tas...@googlegroups.com
Awesome! Thanks for the great info.
I now have Tasker writing down the current temperature of the Nest every hour in a Google Sheet.

Eric

unread,
Feb 10, 2015, 2:32:17 PM2/10/15
to tas...@googlegroups.com
I wanted to say thanks for the instructions.

Corbin

Isaac Asher

unread,
Feb 15, 2015, 6:09:00 PM2/15/15
to tas...@googlegroups.com
Has anyone been able to make this work recently? These posts are rather old and while I've followed the instructions to the letter, nothing posts to Google docs when I submit through Tasker HTTP post. I get HTTPR = 200 and HTTPL ~ 18,000 so I think I'm close. All fields on my google form are text and required fields. I copied and pasted the long URL to the form so no chance of typo there... And I would think HTTPR would be 400 if I got the wrong link.

The form does post a response when I view the live form in my browser and submit that way, just not through Tasker. I confirmed https at the beginning of the server name. Gave me HTTPR 400 when I left off the S.

Any ideas? I'm getting desperate here. :)
Message has been deleted

Eric

unread,
Feb 15, 2015, 6:14:16 PM2/15/15
to tas...@googlegroups.com
I followed these instructions just a few days ago and had no trouble. So I know they work but unfortunately I don't know how to help you. So at least I can tell you it still works. Maybe post your task description and I'll compare it to mine.

Isaac Asher

unread,
Feb 15, 2015, 6:27:50 PM2/15/15
to tas...@googlegroups.com
Thanks Eric!

Here's what I've got:

Server/port:
Https://docs.google.com

Path:
forms/d/<form URL>/formResponse

Data/file:
entry.1902690030=%Client
entry.2134361941=%Services
entry.1117319579=%Date
entry.1791021826=%Paid

Content type:
text/*

I suspect it has something to do with the way the form is set up I'm Google docs. Did you change any special security setting or something? I have tried this both with the form posting to a spreadsheet as well as with keeping the result data in Google forms and same outcome both times.

Eric

unread,
Feb 16, 2015, 10:18:46 PM2/16/15
to tas...@googlegroups.com
Below is the export of my task. I didn't change any security settings or anything like that. Just set up the form picked text only for the answers and made sure they were required. You said in your post action that you selected text, I didn't so that.


Sheets Post (161)
Run Both Together
A1: HTTP Post [ Server:Port:https://docs.google.com/ Path:forms/d/<my form>/formResponse Data / File:entry.982035824=%aitext1
entry.1868866798=%aitext2
entry.765317990=%aitext3
entry.1122342158=%aitext4
entry.200115878=%aitext5
entry.319705402=%aitext18 Cookies: User Agent: Timeout:10 Content Type: Output File: Trust Any Certificate:Off ]
A2: Flash [ Text:%HTTPR Long:Off ]

Carlos Conceicao

unread,
Apr 2, 2015, 9:44:32 AM4/2/15
to tas...@googlegroups.com
its there any way to get data from spreadsheet???

















 
                  ***** IMPORTANT INFORMATION/DISCLAIMER *****´
By sending an email to ANY of my addresses you are agreeing that:
I am by definition, "the intended recipient"
All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it on usenet.
I may take the contents as representing the views of your company.
This overrides any disclaimer or statement of confidentiality that may be included on your message.
Reply all
Reply to author
Forward
0 new messages