Example workflow using GMail, ReadPDF and Dropbox

Hi all,

for a long time I’ve been trying to use n8n solution to automate a very simple workflow which would:

  1. fetch email from GMail
  2. check if the email is from specific email address and contains a single PDF attachment
  3. if it does, it would extract PDF and the year value (current year is ok, but since PDF file name contains YEAR value, it would be greate to fetch that value from the PDF filename) and upload it to the specific folder on Dropbox (/example folder/$YEAR$ - invoices)

So far, I am stuck on ReadPDF node.

I have no idea how to configure that node in order to extract PDF file from input data and use that (binary data) as an input binary for Dropbox node

This is what I tried (would be logical to me)

Can someone please push me into the right direction?

Thank you very much for your help in advance!

Regards,
Igor

P.S.
I tried the same thing using https://www.integromat.com/ service (free for the test) and I was able to do it in half an hour. Don’t get me wrong. I really like n8n and would like to use it on my own, but even such a simple workflow something I can’t figure out in it. Not to mention something more difficult

Welcome to the community @mihha!

Sorry to hear that you have problems. Yes totally agree in two ways:

  1. There is no example there yet. We are however in the process of adding documentation and an example for every node
  2. The node is simply very bad in general and we should totally replace in the future

Anyway here a simple example:

{
  "nodes": [
    {
      "parameters": {
        "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        600,
        300
      ]
    },
    {
      "parameters": {},
      "name": "Read PDF",
      "type": "n8n-nodes-base.readPDF",
      "typeVersion": 1,
      "position": [
        750,
        300
      ]
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Read PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hi,

thank you very much for your prompt reaction and answer

Your example didn’t actually help me :grinning:

But I was able to pass the ReadPDF node successfully with lots of trials and errors

I have now another issue with the Dropbox node, but I believe that this is possibly a bug

The thing is that I have the following folder stricture in Dropbox
/Documents/Računi/2020 - računi/

You can see that folder names have my local characters (Latin literals)

When I try to upload a file to that folder, I get the following error

Is there some trick to use Latin characters in the folder names with Dropbox node?

Regards,
Igor

@mihha cheking this out. Looks like you are not the only one having this issue https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/International-characters-in-filenames/td-p/175750

Hi,

thank you for checking this out. I am sure that this is something that can be fixed. I mentioned earlier Integromat service which I tested. They don’t have this kind of issue so I guess it is not impossible to resolve

I know that I shouldn’t compare with other services and I mean no harm by doing that. Just saying that it can be solved (somehow) I guess

Thank you for your effort

Regards,
Igor

@mihha just fixed the issue. We will let you know when is released. Thanks for reporting it.

Wow! You are really fast!

Thank you very much for such a prompt reaction

Regards,
Igor

1 Like

Got released with [email protected]

Thank you for this notification and prompt reaction

Hi,

this might be a silly question but how do I update to the latest version?

I tried to execute
npm update -g n8n

but I still have version
n8n/0.73.1 linux-x64 node-v14.5.0

Regards,
Igor

That is strange. This should work. Maybe if you are more specific it does. So maybe try something like:

npm update -g [email protected]
# or
npm update -g [email protected]

I already tried both

Maybe I am checking the version in a wrong way?

How can I check which version is actually installed?

You can also check within n8n by typing:

n8n -v

Yes, then I am doing it in a correct way

When I execute npm update -g [email protected] I get no progress in the CLI

https://asciinema.org/a/kRXdsUHwx7Ics77mP2QL7YyJT

Regards,
Igor

Sadly have no idea what is going on there and are also not able to help you to figure it out for exactly that reason. Are simply not an npm expert. It is an npm related problem and maybe a bug in it? Because the last released n8n version is 0.74.0:

The only other things I can advise you to do are:

  • use the n8n docker-images instead (that is generally the best way to run n8n)
  • uninstall n8n and reinstall it
  • upgrade npm

Hi,

I will try to figure it out

  1. docker image is out of the question. I hate docker technology. People tend to use docker today but I have an impression that they don’t know what is going on behind the scene. I like to know what is going on and I like to set up my own system in a way I want it

  2. npm is at latest version which is 14.5

  3. I will try to reinstall n8n as a last resort

Thank you for all

Regards,
igor

I ended up removing completely nodejs, npm and all modules from the system

Only after that, I was able to install latest version of n8n again

No idea why to be honest, but I could afford it since this installation is the only nodejs installation on the server so far

Will dig into it at some time in the future

1 Like