Add pattern parameter to upload widget

Hi,

I’ve seen a few posts about this topic, but I’m trying to find a way using Zapier to copy uploaded files over to Google Drive. I just need some sort of “key” that would allow me to do a lookup to associate the uploaded file to the right user so I can put it in the right folder.

I saw another post about using the “pattern” parameter to specify a folder in S3 - I’m wondering if the pattern parameter can be used in the upload widget? Or is there any other way I can add a key or identifier using the upload widget or filename?

I’m so close to getting everything working, I just need to associate the file to a user somehow. Any help would be appreciated!

Thanks,
Kevin

1 Like

Hi @kevin1437b225a8a242e,

When using Zapier, you can use any key from the Zapier hook payload to define the target path. For example, you can create a folder with the same name as file UUID and put the file in there. However, there’s no way to add a specific custom key or tag to a file, that contains user name or ID hence there’s no way to associate a particular file with a user, using Uploadcare capabilities. We’re going to make it possible to add custom metadata to files in the future.

Can you tell us about your use case? Maybe we can suggest a workaround.

Hi,

I have the same trouble that @kevin1437b225a8a242e ! I’m close to … Have you found a solution since?
I would like to upload the file to a specific (dynamic) folder identified as "/bucket/images/userId/filename

Thanks

Hi @Merdy_Mouanga, consider using metadata to pass arbitrary data to Uploadcare along with uploaded files. Metadata keys can be read from the webhook payload on Zapier’s side, and based on their values, you can programmatically set the target path for the file.