It catches a wehook URL containing a record ID, gets the data associated with that record ID to create a Google Docs document from a template.
A share link to the file is then generated and used to upload the target file to an Airtable attachment field.
It then searches for a state of a status single select field and depending on the state, it will create and send a pre-written email with the file in the attachement field attached to it, unshare the file and change the state of the status field to disable further sending.
My problem is that what is uploaded to the attachment field is not the actual file but the share link to it.
For security reason, I would like to unshare the file once it is uploaded since I read that once a file is uploaded to an attachment field, Airtable replace it with a local copy.
But since the file isn't uploaded, I am stuck !
What did I do wrong ? How shall I proceed to in effect upload the file and not a link to it and still be able to unshare it once uploaded ?