So heres another thought.. I would like to ...

(David Hopkins) #1

So heres another thought…

I would like to have a list of groceries, and in a new form, I would like to be able to scan a bar code off an item on the shelf and have the name, size, etc “auto populate” from an API on the internet.

Im looking at as the source, but Im having difficulty with parsing the results into the form.


Thanks all. .


(David Hopkins) #2


(Levent KULAÇOĞLU) #3

@David_Hopkins can you elaborate your issue with the API?

(Levent KULAÇOĞLU) #4

Creating a standalone Google Apps Script which will make a UrlFetchApp call to the API and then parsing the request to the gSheet. Publishing this script as a webapp and using it as a webhook endpoint in the WorkFlow will work.

(Mary Jane Pender) #5

… Levent … I wasn’t even thinking that far ahead.

But it just might do the job for him.

(Levent KULAÇOĞLU) #6

Mary Jane that will be the quickest solution. That’s the solution that we generally use in most of our client apps where an API connection is needed.

(Jonas /) #7

@Levent_KULACOGLU No this would not provide live-data. Because the workflow rule will trigger, the Apps Script will fetch, but the result has to be pushed to the user. This will only happen with a full-sync or at least a background-sync.

(Mary Jane Pender) #8

@Levent_KULACOGLU That’s great Levent.

I hope this helps David and I have certainly learned a new trick.

thank you.


(Jonas /) #9

@David_Hopkins Do you need the results to be visible instantly upon putting in the EAN or can this be processed in the background?

If background, then @Levent_KULACOGLU

solution will work for you.

(Levent KULAÇOĞLU) #10

@Jonas in our tests we have verified from the audit log that AppSheet is waiting the result from the script during syncing and display the result.

(Jonas /) #11


Yes this works but as I said, a sync of some kind still has to happen.

If the user needs live-data for example to submit an open form, this does not work.

(Levent KULAÇOĞLU) #12

@Jonas another solution could be using an html styled form rather than an AppSheet form, execute it as an external URL, query the API and fetch the result back to the AppSheet form. This is something very alike that we do with online payment gateway solutions, but worth trying. What do you think @Bellave_Jayaram ?

(Levent KULAÇOĞLU) #13

Yes you’re right @Jonas sync is needed for that. For some kinda live query, my second option can be tried though.

(Jonas /) #14

processing API-calls live will be an awesome feature :wink:

(Jonas /) #15

@Levent_KULACOGLU how does the result get to the AppSheet APP in the case of the external html / php script?

manually copy & paste?

or providing a link, to the app with the results set inside the url, so they would be prefilled in the form?

Would the ap not try to reload upon clicking that link?

(David Hopkins) #16

@Levent_KULACOGLU this is exactly what Im trying to do…

Say your in the market, and you want to add a product to your shopping list, you simply scan the barcode and the form is filled out for you.

Then you enter the rest of the data manually and save the form.

(David Hopkins) #17

@Jonas ,

currently, Im “more or less”, filling out the form manually… then using the UPC to “price compare” while shopping.

But, in the process of building the grocery list, how awesome would it be to be able to simply “scan a barcode” and the form is filled in for you…

(David Hopkins) #18

@Mary_Jane_Pender So Mary, what would be the difference between using the UPC DB and calling a UPC from the scanner? would it be possible to still use the script to “go out” and get the data for the form?

(David Hopkins) #19

@Jonas for this particular scenario, having the info populate the form as the Barcode was scanned would be ideal. However, I could create a PLP style data entry where you “enter product by barcode”, which opens a form, you scan the barcode and save form, system pulls from API and opens new Product Form all filled out. Actually only adding 1 step for the user and makes it abit like a Wizard.

(David Hopkins) #20

(Side Note: really impressed with this community! You all are attacking this like hungry animals. :wink:

It’s a beautiful thing! )