Failed to create a file in Dropbox The app returned "Origin Status Code Error: 422".
Hi folks,
I’m trying to set up a zap that monitors a Brandfolder collection for updated assets and sends them to a Dropbox folder.
Trigger: Updated asset in Brandfolder - working fine.
Action 1: Find an asset in Brandfolder - working fine. (Note: This is set up to extract more data fields from the updated asset)
Action 2: Upload file in Dropbox - not working. Returning: Failed to create a file in Dropbox The app returned "Origin Status Code Error: 422".
I believe this is because the CDN link presented by Action 1 is the Asset CDN Link (used for embedding in websites) rather than the Attachment CDN Link. Unfortunately I can’t see the that the latter is extracted, so cannot select it.
Does anyone know a better way of getting assets out of Brandfolder and presenting them to other cloud storage systems?
Page 1 / 1
Hello and welcome to the Community, @Phil Robbins!
That’s very odd, I’ve definitely been able to use the URLs in a CDN URL field before when trying to send assets from Brandfolder over to another app. Perhaps it’s a permissions related issue.
Do you need to be logged in to your Brandfolder account in order to view the asset?
If yes, can you try tweaking the permissions settings in Brandfolder so that anyone with the link to the asset can view the file, then test the Dropbox action again? That should then allow the Zap to be able to access the file so that it can send it over to Dropbox.
Can you give that a go and report back here to confirm whether or not that fixes it?
@SamB Thanks for the welcome and for your response. It looks like I was trying to pull from a private collection, as switching to a public collection has solved it. Thank you!
The only residual issue I have is that the file (an image) is not pulling through with a readable file extension. I could specify one, but I hadn’t intended to limit the zap to one filetype. Do you have any thoughts on how to resolve this one?
Yay! Thanks for letting us know switching it to a public collection solved it @Phil Robbins!
I just did a quick test and I’m seeing a file extension for images when using a Find Asset action:
Is it that you’d like to select that file extension to use it in the Specify File Extension (Dropbox) field?
If so you could potentially extract the file extension by using a Formatter (Text > Extract Pattern)action. You’d need to enter (?<=\.)\w+$ into the Pattern field.
For example:
That would extract the “png” (or any other file extension) from the end of the URL and put it into a field that you can select on the Dropbox action.
If I’ve completely misunderstood things here, just let me know and we’ll go from there!
@SamB you’ve understood it perfectly. I’ve set this up and am getting the following...
output:
_matched: false
It’s worth mentioning that the CDN URL I am pulling through ends with thusly: auto=webp&format=png
I don’t know if that would impact the syntax of what you shared with me? Also, I have all the fields after Pattern set to No, which I hope is correct?
Thank you for your continued support!
Thanks for getting back to me, @Phil Robbins!
Ah, if the file extensions are going to appear as =png instead of .png then you’d want to swap the period for the equals sign in that regex pattern. So it would need to look like this instead:
(?<=\=)\w+$
That’ll search for the “=”at the end of the URL and extract the file extension that comes after it.
Keen to help get this working so please do keep us in the loop on how that goes!
@SamB genius - that worked! I now have a 4-stage zap that passes updated assets to Dropbox. Thanks so much for your support in getting this up and running.
@Phil Robbins woohoo! So glad to hear Sam’s suggestions were helpful and that you were able to get everything working. We’re here to help if you have any other questions moving forward. Cheers!
@Phil Robbins congrats!! Would you be willing to share/publish that Zap? I’m trying to do something VERY similar but I’m a total newbie here. I’ve successfully created a Zap that sends a notification to Slack every time a new asset is uploaded, but I’m out of my league trying to do the middle part that you did, to find the asset. Ideally I’d like each new asset to be shared (not as thumbnail, actual link to asset in Brandfolder) in Slack with each notification.
Thanks in advance, hoping you can help here, been running into brick walls all afternoon! Ouch! ;)
Jenny
@JennyHunter I don’t think I’m able to publish it at this time due to account limitations, but I’d be happy to share any settings for the steps I’ve created.
The Find Asset step exists to extract the CDN URL, which doesn’t get pulled by the Updated Asset step. The Find action has the Asset ID in the Search Query field, which identifies the asset from the first step and extracts more info. I’ve also narrowed the search by pointing it to a specific Brandfolder and Collection, but I’m sure that’s optional.
The Text in Formatter step extracts the CDN URL and strips the file extension so that it can be used in the final step. The Event is Text, the Action input is CDN URL and the Pattern is (?<=\=)\w+$
In the final step, which will be different for you if you’re posting to Slack, but maybe it contains similar fields, has the Action file as CDN URL and Specify File Extension as the step 3 Output.
Let me know if this helps - I’d be happy to add a few screen grabs if needed.
Phil
@Phil Robbins thank you so much! Between your help, all of the fantastic help others provided earlier in this thread, and the fantastic help I got from Zapier support...I DID IT! Very proud (perhaps ridiculously so) that I’ve made my very first Zap! Really appreciate this supportive community.
@JennyHunter great to hear you got it sorted! This was my first foray into the community too, and I’m delighted with the support I’ve received.
Woo, way to go @JennyHunter!
I’ve worked at Zapier for 5 years and I still get excited when I put together a Zap that I’ve been puzzling on for a while. I’m really happy that you both found the answers you need, and we look forward to welcoming you back in the community the next time you stop on by