Skip to main content

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.

Hello,

 

I have been building a Zap that I am wanting to using to update inventory. I am pretty confused on how I execute what I need out of this Zap and I am having trouble finding good references. The current layout looks like this:

OneDrive: New File >

Formatter by Zapier: Utilities >

Code by Zapier: Run JavaScript >

 

Microsoft Excel: Find Row >

Microsoft Excel: Update Row ]

My questions are as follows:

Do I just end on Update Row or do I need to add something to the end?

After I get all of the data I need from the New File can I delete the file before the Loop section?

-The way I have been looking at doing this is with Webhooks by Zapier, I could put it after I run Java script using the Custom Request Action > Method Delete. I cannot figure out how to do the URL part and how all the pass-through stuff works. Could someone please help me understand this?

Hi ​@Donco Coding,

 

Welcome to the Community.

If you're updating inventory in Excel using Zapier, ending your Zap with "Microsoft Excel: Update Row" is usually sufficient unless further actions are needed. If you want to delete a file after extracting data but before looping, you can use a Webhook with a DELETE request to the OneDrive API, using the file's item ID. Ensure proper authentication (like OAuth tokens) is included in the request headers. Webhooks let you send customizable HTTP requests, and "pass-through" refers to any extra data needed, like headers or tokens, to complete the request successfully.

Feel free to ask if you need further help or have additional questions. We're here to assist you.


Hi ​@Donco Coding 

Zap action: OneDrive - API Request

OneDrive API endpoint documentation for deleting a file or folder: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_delete?view=odsp-graph-online

 

If you need help with configuring advanced logic, there is a directory of Certified Zapier Experts: https://zapier.com/experts

 

 


Hey there ​@Donco Coding 👋

Were you able to get the file deleted using an API Request action like Troy suggested? Or did you reach out to a Solution Partner (formerly Zapier Experts) to get it sorted?

Want to make sure you’re all set, so let us know how it’s going. Happy to lend a hand if you got stuck at all! 


Hey ​@SamB 

 

the Solution Partner tried to help but did not explain very well. I ended up getting chat GPT to teach me.

The delete URL needs to start with this formatting:

https://graph.microsoft.com/v1.0/drive/root:/

 

Contrary to what most people were saying you are supposed to leave Query String Parameters and Additional request headers blank.

Thank you.


Hi ​@Donco Coding,

 

Thanks for sharing your solution. I'm glad to hear ChatGPT helped you resolve the issue! Correctly formatting API requests, like the Microsoft Graph API delete URL, is key. For others facing similar issues: always double-check your endpoint structure, leave unnecessary fields blank if not required, refer to the official API docs, test requests using tools like Postman or Zapier's test feature, and don't hesitate to share solutions with the community to help others.

Feel free to reach out if you have any questions or need further assistance.