Python Forum
Confused on how to go about writing this or doing this... - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Confused on how to go about writing this or doing this... (/thread-24325.html)



Confused on how to go about writing this or doing this... - pythonforumuser - Feb-09-2020

Currently we have a Google Forms that people fill out with (NAME), (ADDRESS), and (CITY, STATE, ZIP CODE)

It automatically goes to 3 cells in google sheets that are next to each other. We then have to manually copy and paste each part of mailing address and then open Google Docs and paste it like this on a label:

NAME
ADDRESS
CITY, STATE ZIP

And with 100s of these a week, it just takes a lot of my time up.

Ideal Way: I want to create a program that will automatically take the google forms data and have it go onto Google Docs and create labels. Then I can just hit print. I am not sure if this is possible? This would be absolutely ideal.

If not, I would make google forms get 3 sets of input (NAME), (ADDRESS), (CITY, STATE ZIP) and then put it into 1 cell but put each one on a different line (all in 1 cell) so I can easily just copy and paste into on a label.

How would I set up this python program to run and do this for me? Can we do the ideal way?


RE: Confused on how to go about writing this or doing this... - metulburr - Feb-09-2020

You should be able to use selenium to control the browser to automate the process.

It would be easier if we had the google doc with the required fields.

This is the basic concept:
https://python-forum.io/Thread-Web-Scraping-part-1
https://python-forum.io/Thread-Web-scraping-part-2


RE: Confused on how to go about writing this or doing this... - pythonforumuser - Feb-10-2020

I have a general idea...

Can we get the program to go something from this (just random data I made up and put onto Google Sheets):

https://ibb.co/DYDXR8k

to something like this:

https://ibb.co/XyR4RVk

We could do this through Python and Google API? Or is this not possible? Or too difficult?


RE: Confused on how to go about writing this or doing this... - snippsat - Feb-10-2020

(Feb-10-2020, 07:00 AM)pythonforumuser Wrote: We could do this through Python and Google API? Or is this not possible? Or too difficult?
Look at API Python usage for Docs and Sheets.