How to send PDF form field data to a google spreadsheet

Mar 07, 2019

Copy link to clipboard

Copied

Good evening, I am wondering if it is possible to send PDF data to the google spreadsheets? We are trying to find a way to automatically update our spreadsheets after our local program gets finished processing our customers. Thank you!

So a submit from a PDF sends an HTTP Post to a server.  This is exactly how an HTML form works. So the technique is to create a Google form with exactly the same field names as the PDF form, then create a Google sheet for this form. All automated on the Google side. Then take a look at the what the form submit is doing from the Google form. Use the same submit URL in your PDF submit. Of course the PDF submit action will need to be set to HTML.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to send PDF form field data to a google spreadsheet

Mar 07, 2019

Copy link to clipboard

Copied

Good evening, I am wondering if it is possible to send PDF data to the google spreadsheets? We are trying to find a way to automatically update our spreadsheets after our local program gets finished processing our customers. Thank you!

So a submit from a PDF sends an HTTP Post to a server.  This is exactly how an HTML form works. So the technique is to create a Google form with exactly the same field names as the PDF form, then create a Google sheet for this form. All automated on the Google side. Then take a look at the what the form submit is doing from the Google form. Use the same submit URL in your PDF submit. Of course the PDF submit action will need to be set to HTML.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 07, 2019 0
Mar 07, 2019

Copy link to clipboard

Copied

Yes, you do it in exactly the same way a Google Form sends data to a Google Sheet. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 07, 2019 1
Mar 08, 2019

Copy link to clipboard

Copied

Interesting, thank you for your reply! Do you mind if you can link to me some resources, ot the general steps in doing so?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 08, 2019 0
Mar 08, 2019

Copy link to clipboard

Copied

So a submit from a PDF sends an HTTP Post to a server.  This is exactly how an HTML form works. So the technique is to create a Google form with exactly the same field names as the PDF form, then create a Google sheet for this form. All automated on the Google side. Then take a look at the what the form submit is doing from the Google form. Use the same submit URL in your PDF submit. Of course the PDF submit action will need to be set to HTML.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 08, 2019 1
Mar 08, 2019

Copy link to clipboard

Copied

That makes sense, I have a few more questions about the automation on the google side, as well as editing a google spreadsheet: 1. Is it possible to make changes to an already existing google spreadsheet, based on form field data?   ex: "We sent 'Customer A' an email this month, so change a specific cell to Yellow" 2. When the form field information is in a spreadsheet, will our custom scripts run automatically on the google side, or do we have to run our google scripts manually?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 08, 2019 0
Mar 08, 2019

Copy link to clipboard

Copied

That's a google question, and beyond my experience. I played around with a bunch of the google apps years ago to see how PDF could be integrated into it. But I haven't used in since then.  I would imagine that the sheets app will react to PDF submit in the same way it does to a GForms submit. But that's only speculation.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 08, 2019 2
Mar 08, 2019

Copy link to clipboard

Copied

That is okay, this is some new territory for seemingly a lot of people, since google apps aren't often automated beyond  a far extent.  What we can find and figure out, we will definitely let you know our process and others too, as well as our code.  Thank you for your advice and time!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 08, 2019 1
Jul 13, 2020

Copy link to clipboard

Copied

I would love some more information on how to actually have the PDF submit action be set to HTML. I am familiar with Google products and have seen some information on how to create a custom HTML form but that will be much longer for me than getting my already existing Adobe PDF form to just send the data to my Spreadsheet. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2020 0
Jul 13, 2020

Copy link to clipboard

Copied

Go to the Properties of the Submit button, edit the Submit a Form action associated with it and change the Export Format to HTML:

 

try67_0-1594647213779.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2020 0
Jul 13, 2020

Copy link to clipboard

Copied

Thank you!

I managed to figure it out.

I got it working now.

Any chance you know how to get it to be able to be filled out via any web
browser vs only in Adobe? Or know how to easily convert it to an HTML form?

Chris
[Private info removed. -Mod.]

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2020 0
Jul 23, 2020

Copy link to clipboard

Copied

Hello I am not very experienced with PDF forms and this is the only post I have seen where someone got this to work, but I am having some issues so if someone could help that would be great.  I have a PDF form set up and a google sheet with a form tied to it. I have an action button in my PDF that sends the responses as HTML. What link do I submit the PDF to? I tried the response link the google form generates and it generates a timestamp in the google sheet, but will not fill out any of other columns. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2020 0
Jul 23, 2020

Copy link to clipboard

Copied

You need to rename your form fields on the PDF to match the entry item
names on the google form.

Best way to find those is to get a prefilled link from your google form.
Then take the field names and rename your pdf fields.

That should do it if you have the right URL.

[Private info removed. -Mod.]

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2020 0
Jul 23, 2020

Copy link to clipboard

Copied

Do not reply by email if it includes your contact details, please. I've removed them from your last reply.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2020 0
Sep 05, 2020

Copy link to clipboard

Copied

This is very helpful and opens a lot of new opportunities. I'm unfortunately stuck with an empty Google form. I can't seem to figure out how to pass the PDF form field value to Google form and than submit automatically. Even after getting the number code from Google representing the field and renaming the PDF form field accordingly. Could you show a URL example passing the value from PDF to Google?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 05, 2020 0
Sep 05, 2020

Copy link to clipboard

Copied

More specifically I can't figure out what to add after "...&entry.1045268=" to grab the value in the PDF form equivalent field named 1045268 dynamically.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 05, 2020 0
Sep 06, 2020

Copy link to clipboard

Copied

Acrobat isn't submitting to a Google form, it's submitting to a Google Sheet. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 06, 2020 0
Sep 06, 2020

Copy link to clipboard

Copied

Ah...I think I was overcomplicating things. You mentioned "Then take a look at the what the form submit is doing from the Google form." How would I get the submit URL to post to?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 06, 2020 0
Sep 06, 2020

Copy link to clipboard

Copied

When you create a Google form you have the option to connect it to a Google sheet. The Google form is created in HTML, and it includes a submit button.  So you create a form, connect it to a sheet, then then look at the URL for the submit button.  Then use this for the submit URL on your PDF form. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 06, 2020 0
Sep 07, 2020

Copy link to clipboard

Copied

The trouble is that the Submit button links to a script (see screenshot below). Do you know of a way to get the post to URL in this case?

submit script.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 07, 2020 0
Sep 07, 2020

Copy link to clipboard

Copied

Alright. I'm finally making progress...

The post to URL is the same as the preview form URL from the browser's address bar except I needed to replace "viewform" with "formResponse" at the end.

I renamed the form field names to something like "entry.1045268", and I got the exact numbers with the "get prefilled link method"

 

I have been using Bluebeam to create the form. When I tested it, it just jumped me to the fillable form.

When I use Acrobat Reader DC it works! It does give me an annoying error (see screenshot), but it pushes the response into the Google form. If you have any suggestions about cleaning out the error, or why this only works with the Acrobat Reader DC, please let me know. PDFs should act in a uniform way!errorjpg.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 07, 2020 0
Sep 09, 2020

Copy link to clipboard

Copied

(I found the URL in the meantime.)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
Nov 19, 2020

Copy link to clipboard

Copied

Did not know if someone could post some examples.   I am having similiar issues to not getting any form data to post and I am unsure where the issue is.   Does the form field need to be named like "entry.11111" and does the url need to include that value as well?    I get a time stamp but that is it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 19, 2020 0
Nov 19, 2020

Copy link to clipboard

Copied

The HTTP Post created by the Acrobat submit have to match the HTTP Post from the google form. To do this the field names must match and the data must be submitted in HTML format. 

 

Google returns HTML, which Acrobat doesn't like, but that's how it goes. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 19, 2020 0
Nov 19, 2020

Copy link to clipboard

Copied

So would the post url just be the url like this?

 

https://docs.google.com/forms/d/[form id]/formResponse

 

Or would it be 

 

https://docs.google.com/forms/d/[form id]/formRespone?entry.123456789=Answer1&entry.987654321=Answer2

 And if the second how do you reference the value in the pdf form.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 19, 2020 0
Nov 20, 2020

Copy link to clipboard

Copied

I believe the first URL is sufficient. However, if either will work then you would need to script the second submit.

Here's an article on that topic:

https://acrobatusers.com/tutorials/submitting-data/

and this one is helpful as well

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 20, 2020 0
Jun 08, 2020

Copy link to clipboard

Copied

Good morning, has a solution been created for this process? I tried creating this same process for our internal use and receive an error message trying to utilize "Run a JavaScript" and it does not fill the fields but renders a timestamp in the google spreadsheet. "Submit a form" does send all the fields to the google sheet but a similar error message appears. Thom would you have any suggestions on how I can get a thank you page, or message to generate instead of the error message?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 08, 2020 0
Sep 06, 2020

Copy link to clipboard

Copied

Sorry for the late reply.  I missed the message.

What is the exact error?

 

I think what you may be seeing is Acrobat responding to the HTTP Responce from Google.  Acrobat doesn't know how to handle it. It's been a while since I've worked with this so I'm not sure of the details. However, I do believe there is a way through the Google services to customize the response in a way that Acrobat does understand.  To do this you'll need to write some custom JS on the Google side. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 06, 2020 0
Dec 28, 2020

Copy link to clipboard

Copied

Do I have to host the pdf on a server or can it be on my local desktop? I followed the steps. I created the Google Form that links to the Google Sheet. Then, I got the field names using the Prefillable link and have the correct url. Then I created the submit button and set it to HTML and the action is mouse up > submit form. I keep getting general error. Nothing populates into my sheet. Any advice? Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 28, 2020 0