4 ms·
Apps Script is amazing and a sorely under-appreciated feature in Workspace.
by agentdrtran 5y ago
Apps Script is amazing and a sorely under-appreciated feature in Workspace.
- Edman274 5y agoI built a Google Apps Script Gmail add-on (with a UI and card view for a selected email) for archiving email contents as a PDF to an internal enterprise document system using GAS and AWS API Gateway. Here are two extremely annoying problems that I really can't fix using this platform: 1. Calls to UrlFetchApp.fetchAll() will fail with an "Unexpected Error" exception about every 3 to 8 percent of calls. The way my code works is that I'll make one GET request to an AWS API Gateway endpoint to request a pre-signed S3 URL, and then I'll use the pre-signed S3 url to PUT a document. The unauthorized first request will fail sometimes, and issuing a PUT to the pre-signed S3 url will fail sometimes too. I have found no reason that these requests should fail, so instead of torturing myself by trying to figure out the root cause, I've decided to wrap both fetchAll() calls in a loop that retries the exact same request three times before giving up. If there was anything wrong with the request itself, one would expect a retry loop to be pointless, but it's significantly reduced the number of add-on failures. 2. If an email has invalid SPF alignment, then the add-on won't run at all. It's been three years and there's still no workaround for this. I have had to explain to dozens of people over the past three years that there's nothing I can do about it. https://issuetracker.google.com/issues/112064778 https://issuetracker.google.com/issues/112064778 . I feel like Google Apps Script - especially Gmail add-ons - are sorely neglected and are treated as an annoying legacy product that will probably be discontinued very soon with no replacement.
- saagarjha 5y agoYeah, I found that UrlFetchApp.fetch had similarly weird issues–I got a lot of sporadic “Address unavailable” errors out of it.
- agentdrtran 5y agoYes, it's incredibly annoying how little attention it seems to get from google. Bugs sit in the bug tracker for years and while I like the redesign it broke a function I used (to get the current URL so create multi-page apps). Apps Script just got a new UX update not long ago which I took as a good sign but App Maker had a roadmap going out a year when it got killed, so.
- thepangolino 5y ago
- bonzini 5y agoIndeed, at my workplace we use Gmail and it's been a lifesaver for sorting email. Now of course it would not be necessary if only Google implemented sieve or at least proper header and substring search in the backend filters; but some functionality such as tagging and untagging entire threads is very useful. I also use Apps Script at home to send me email if the home network goes offline (a script at home updates a cell in a worksheet every 10 minutes, one on the cloud checks that it's been updated recently). It has saved my frozen goods at least once.