Google App Script Webhook URL works in browser but not in IFTTT, Zappier or Pipedream

338 Views Asked by At

I have written a Google App Script web app that reads a .csv file and outputs a cleansed .csv file. I want to execute the script when the source .csv file is added to a folder on Google Drive. I added a doGet function to my code that calls my main function. I am able to execute the URL successfully from my browser (every time). When I put the URL into any integration tool (IFTTT, Zappier, Pipedream, Automate.io), the trigger fires successfully(based on adding the file to GDrive) and the integration tool (IFTTT etc) reports that the Webhook fired and completed successfully. However, when I look at my executions in the Google App Script editor there is no logged execution, and my source file has not been converted to my output file.

I had this working two days ago, I'm not sure what changed, or how I broke it. Help!

----------NEW CLARIFICATION TO QUESTION

Thanks Tanaike, very helpful information. My use case for having the program run as "User" versus "Me" is that I'm sharing the script with my father. The idea is...... on export of google contacts to a specific folder on Gdrive, the script will execute, convert the .csv file to Gsheets, scrub the data, and export the data back out to a .csv so that it can be used by another program. Therefore, I need it executing with user credentials, so that when my father exports his contacts, it executes on his Gdrive data, not mine. I set up an IFTTT account for him as well. I like the idea of pattern 3, but I couldnt get it to work. I had the same result as before. The trigger fires.... IFTTT shows that the webhook fired, however the script has no execution logged in the Google apps script editor (and obviously the script didn't run as it didn't pick up my file and convert it). When i put the URL into my browser (with the key), everything is fine. I'm learning as I go......

Questions for Tanaike (Based on your prior post of 3 options)

  1. How does pattern 3 help with the fact that IFTTT is executing the "Get statement" and doesnt have google credentials? Pattern 3 sounds great if we can get it to work.

  2. How would pattern 2 work? Does this pose a security risk? What is the 'scope' of the access token?

  3. Can you think of other options that would allow the script to execute commands on an end-user Gdrive account, when a file is added to an end-user Gdrive account?

doGet function that calls my main app function inside google app script

IFTTT webhook setup

IFTTT execution response

Google App Script Deployment Config

0

There are 0 best solutions below