Pass received file from n8n form node to the code node, And Pass the received file to API request as payload

How can I pass the file received from n8n’s form node, to a code node so that it can perform operations like ( count no. of pages, extract initial content ,etc). Also how can I pass that file as payload to a http request.?

Hello @Himanshu_Rana,

It depends on your use case. The Code node doesn’t allow importing external libraries, so you’ll likely need to use the Extract from File node instead. It also depends on how you want to send the data in the HTTP Request node.

Here’s a simple workflow that will hopefully help you get started:

2 Likes

it’s helpful thanks

1 Like

Nice :slight_smile: handy to know.