Export PDF invoice from woocommerce to Drive

Hello
my goal is to export pdf invoices from Woocommerce to a folder in my Google Drive

I know I need to “watch orders” as a trigger, but there is no info about the pdf file on that order data.
PDF invoices are generated by a typical woo plugin “PDF invoices and packing slips”
Anyone knows a way to do that?

I think i can change the trigger from “watch orders” on Woocommerce to “watch files” on the FTP module because all PDF invoices must go to a folder inside uploads and maybe I can retrieve them from the FTP folder and send it directly to Google Drive although I would prefer using “watch orders” as the trigger

I have now an scenary with “watch orders” from Woocommerce , “list of files/folder” from FTP module and finally “upload a file” from Google Drive module.

When an order is placed in woocommerce I look into an specific FTP folder for a file named "invoice + - + {order id}.pdf and then I upload this file to a Drive folder.
image

The problem is that pdf is empty.
I think i´m not uploading the file itself but creating a new pdf with the path inside it.

I have inserted a new FTP module: “Get a file” and then I´m now able to map a real Data field from “Get a file” to “Upload a file”
And voila!
I have now my invoice from my hosting FTP server to a Drive folder.

I hope it helps!

2 Likes

Advice for optimizing the scenario is welcome. I´m not sure how “from now on” works. I have limited items to 10 because I don´t think there will be more than 10 daily orders.
I´ve scheduled the scenario to work every 1440 minutes (once a day)

Heya @Roger_Montero :wave:

Awesome work building that scenario all by yourself! :clap: Let’s see if the community jumps in with some optimization tips and tricks.

In the meantime, I wanted to share this resource that might shed some light on how the “Choose where to start” – “From now on” feature works.

:books: Selecting the first bundle

1 Like