Depending on the nature of what you are trying to do and what kind of control you had when creating your mail request, you can integrate with the Drive API. If the mail data can be sent to the Drive user account as a file (for example, containing raw JSON data), your script can then find this file, load its contents, do whatever you need (put it in a spreadsheet for example), and possibly delete the disk file. This assumes, of course, that you control how the mail request is sent. The workflow may include:
- The client sends a mail request with the data to the user. Drive account (tag or name file that will be easily identified later).
- Upon completion of creating the disk file, the client sends a request to your script with the parameter "method = consumeData" or such
- Your script verifies the user account using the DocList service and retrieves any files uploaded for your script
I have not tried it yet, but should work!
source share