HTTP req with PDF file

I want to go to PDF.co to split the pdf, i have pages selected from code node and pdf file that is in merge node. When i try to upload it i run to one of these two errors. II tried with bots and documentation but i still run into them.


and

i changed the key a few times tried everything chatgpt and deepseek offerd and it still errord. This is the workflow i used:

So if i can connect PDFco it would be much better then code nodes.

Hey @Saavic

After a few adjustments, I was able to make it work:

Please note that I had to change some fields and you’ll need to adjust that for your use case, ok?

For example, I’ve changed the “data” field to “data0”, and your code wasn’t working for my PDF, so in the last node I had to write the page range instead of using the output from your Code node.

Another example was that you were using an expression here, while you should be using the field name in simple text format:


.
.

Copy the workflow to your workspace and see if you can make it work that way.

.

:point_right: If my reply answers your question, please remember to mark it as a solution.

1 Like

Oh! By the way, I have also created a credential to use with PDF.co, instead of writing it into the workflow. It’s safer to use credentials.

To create a Header Auth credential (the one required by PDF.co), follow these steps:

  1. Create a new Header Auth credential

  2. Add the values like this

This will do it, thank you very much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.