I am trying to copy a file in OneDrive from one folder to another and giving it a new name.
My zap trigger is a new record in an Airtable view. This record contains (a) the new file name I want to use and (b) a link to a file on OneDrive, like so: https://adimps-my.sharepoint.com/:u:/g/personal/name_lastname_website_com/Efxw9QkPLmiFs-QHj9veWj2VZLU4EsMbeqpJjyQl-OCwLz?e=8eKqvm
This used to work well for files in Google Drive (using a File ID extracted from the Google Drive URL), but I can’t get anything to work in OneDrive:
- If I use the string of characters in the URL as the File ID like I did for Google Drive, I get a correctly named file that is only ~50 bytes and contains only that string of characters as its contents.
- If I use the URL to point to the file instead, I get a larger file (a few hundred KB), but its contents are simply a bunch of HTML, and the file size is the same no matter what the input file was.
- In all situations, the file extension is not being preserved.
How do I get this zap to work? The name of the file being copied/renamed is not always predictable based on the information in the Airtable record, but the OneDrive link is always known.