Skip to main content

Hi,

It’s me again. I’m creating a zap to create a new record in my CRM system every time a form is submitted. Everything works fine, extracting data, creating Google Drive, etc… The only thing I get stuck on is getting the uploaded files from the Gravity Form in my Google Drive.

The URLs are all combined in 1 field. When I upload this field to Google Drive I get a txt field in return. So I guess I need to separate these fields and upload each file separate. 

Can anyone point my in the right direction to do so? If I get a single URL, can I upload to GDrive?

Thank you once again for your advice!

You can use a Formatter or an AI by Zapier step to take the combined text and split it into separate links. If you use Formatter, it will probably take several steps to split, extract, and then cleanup the links, but those tasks are free and don’t require a paid account. The AI step will only take one action, but requires a Pro account.

After you get the links taken care of, you will probably need a Loop step to add each link to the record...unless your CRM supports line items or multiple uploads in a single step.

I’ve done this exact thing for Hubspot and needed the Looping step.


Thank you @DavidLGS!

I have a Pro account so that’s covered. Do you have a prompt example how you’ve done this?

The files don’t need to go to the CRM, they need to get uploaded in a Google Drive folder.


Sorry, no, I don’t have a prompt. I actually did mine with a code step. :-p

I also just checked my zap, and I definitely used a loop step for adding the files to Drive. So, first ingest the raw data, split the links into line items, create a loop based on line items, then add the files to Drive.


Let me try and I’ll get back as soon as I’ve worked it out.


Hi ​@bocal ,
 
We just wanted to see how everything is going with your Zap. Did David's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


Hi ​@JammerS , I’m still breaking my head on the code part on how to extract the URLs. I guess it will work in the end but need some extra research time.


When using AI by Zapier, you literally just describe what you want it to do. Here’s the prompt I used:
 

 

 

And here’s the output:

 

 

However, I have never been able to get the output into line items directly. Maybe someone else can help with that. So in this instance, you should also use a Formatter > Utilities step to take the two output URLs and create the line items:

 

 

 


Hi ​@bocal 

Another options is to use 1 Code step.

There is an AI assistant available within the Zap Code step to generate custom code for you based on a prompt.

Help: https://help.zapier.com/hc/en-us/articles/15666688064013-Generate-a-Code-step-using-AI-Beta

 

For prompting, it’s helpful to provide example inputs and expected outputs.


The AI code helped me a lot, for some reason I always managed to ignore it. I now have the separated and cleaned URLs. However, the upload to the Google Drive still doesn’t work. It gets uploaded as a txt document whilst the document itself is either a jpg or a pdf.

Crazy things! 😆


@bocal 

For us to have current context, post screenshots showing how your Zap steps are outlined and configured in EDIT mode with the field mappings visible.


Reply