Extract an attachment from Help Scout

Hi all,

I’m trying to extract a PDF attachment from an email received via our customer service platform Help Scout. I then want to upload the attachment to Google Drive. Here’s the basic flow.

I’m having some issues identifying the attachment in the Help Scout module output. I can see attachments which is an array…

So I figure I probably need an array aggregator in the flow. Now when I reference the Array in the Data section of the Google Drive module, I’m unsure which bit I should be using as the reference…

I’ve tried entering this in the data section (see screenshot)

Google Drive accepts it and uploads the file to the drive, but it’s not the attachment. Just a blank file.

Here’s the output of the bundle.

Any suggestions as to what I’m doing wrong here?

Hi @DK1,

You need an iterator instead of an array aggregator. Just use the iterator and pass the attachment array to it. Plus, Since there is no file data over there, you will need to use HTTP apps > Download a file module before the Google Drive Upload one.

2 Likes

Hi @Runcorn

Thanks for the reply and the information. I’ve added the iterator and passed the attachment array to it like this…

I’m slightly unsure what I should be passing to the HTTP Get a file module though. I’ve tried most of the options like this…

But when I run the scenario it’s stopping at the iterator and not going any further as you’ll see below.

The array bundle coming out of the iterator appears to be empty which I’m guessing could be the cause of the problem?

You need to pass the URL to download the file before using it in the Google Drive.

2 Likes

Hi @Runcorn,

Thanks for the reply.

I think I’ve done this already, using this URL…

And passing it to the HTTP Get a file module like this…

Doing this results in an error in the HTTP module. “Missing value of required parameter ‘url’.”

Any ideas?

Means its missing the URL @DK1 .
Did you check ther output of the iterator, and verified each bundle has an URL?

2 Likes