Add download attachments option to Jotform Trigger

Right now files that are sent through JotForm, are not present in the JotForm node responce. So you can’t use these files in the workflow.

Meanwhile, it is possbile to get the download link for these files., through the HTTP request node, but this has some obstacles:

  1. you have to pass the API key as a query parameter, which means you have to store it as an $env variable or hardcoded. Both options are not quite good.
  2. The file ID, coming from the JotForm node, is given in form of its internal field number. You have to match it with its name,using a Function node or whatever.

So maybe it’s better to include the file links into the responce?

Are we talking about the JotForm trigger? if so, can you share what you received? is it including the file property but not the value?

Yes, about JotForm trigger. The file property is absent in the responce.
This is the responce (I replaced some data with ***):

[

{

"formID": "***",

"submissionID": "***",

"webhookURL": "https://***/webhook-test/***/webhook",

"ip": "***",

"formTitle": "Fancy Envelope Contact Form",

"pretty": "Name:textbox_sample0, E-mail:[email protected], Website:textbox_sample2, Message::Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mollis ultricies interdum. Nullam pharetra vitae lectus eget volutpat. Integer in sodales ligula. Vestibulum pellentesque arcu in est aliquam rhoncus. Curabitur et dui quis arcu scelerisque congue. Pellentesque libero ligula, sagittis a tempus quis, finibus eget erat. Nunc sed tempor nunc. Mauris tempor odio id lorem commodo dapibus. Nulla viverra mi in magna imperdiet volutpat., **Attach files:8.jpg**",

"username": "grinzello",

"rawRequest": {

"Name": "textbox_sample0",

"E-mail": "[email protected]",

"Website": "textbox_sample2",

"Message:": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mollis ultricies interdum. Nullam pharetra vitae lectus eget volutpat. Integer in sodales ligula. Vestibulum pellentesque arcu in est aliquam rhoncus. Curabitur et dui quis arcu scelerisque congue. Pellentesque libero ligula, sagittis a tempus quis, finibus eget erat. Nunc sed tempor nunc. Mauris tempor odio id lorem commodo dapibus. Nulla viverra mi in magna imperdiet volutpat."

},

"type": "WEB"

}

]

This is a part of additional HTTP-request I send after, having the submissionID:

"10": {

"name": "attachFiles",

"order": "7",

"text": "Attach files",

"type": "control_fileupload",

"answer": [

"https://www.jotform.com/uploads/grinzello/***/8.jpg"

],

"prettyFormat": "<a href="https://www.jotform.com/uploads/grinzello/***/8.jpg" target="_blank" title="8.jpg">8.jpg</a>"

}

I was able to get the path of the file to download using only the trigger? Is not this what you are looking for?

Oh, yes.This is it, but I didn’t see it in my trigger results.

it’s omitted when resolve data is set to true for some reason. In the meantime do not turn it on.

1 Like

Ok, I understood, thank you.

Hi @RicardoE105,

Sorry to bring up this old topic as I am new to n8n workflow and would like to seek your advice/help.

Currently, I am working on a prototype using Jotform node for file upload and while I am able to see the path of the uploaded file, I could not extract the file through HTTP node. It returns “ERROR: UNKNOWN ERROR - check the detailed error for more information” with 404 error code and below is the screen capture of the HTTP node setup and error message:

Thanks,
Leon

It looks like you are using the wrong endpoint to download the file.

Hi @RicardoE105,
Many thanks for your response. Once I set the form to “Public Form”, it works fine but not sure if this is the right approach. As for the suggested endpoint, which n8n node should I use for accessing the uploaded file. Please pardon my ignorance as I am very new to n8n workflow and still learning. FYI, I am using Jotform uploaded file (ie. receipt image in jpg) to feed into Mindee node to extract receipt data.

You can use the HTTP node. Ideally, the Jotform trigger would automatically download the files (when some parameter is activated) but sadly it’s currently not possible.