Lexoffice error: Halted Exception: Unable to upload file: The file extension does not match the file type.
Lexoffice Zap does not upload invoices sent to a particular email address
I set up a lexoffice zap with Zapier yesterday. Basically, the zap has to do the following:
An invoice is sent to our email address called invoice@company.com. After the email arrives in the inbox, it should be uploaded to our bookkeeping software lexoffice.
Yesterday, this worked very well.
Unfortunately, as of today, it does not work any longer. The IMAP by Zapier part works fine. I already checked it and got the confirmation by Zapier as well.
However, the lexoffice upload does not work as intended. I always get the following notice:
This lexoffice step hit an error
Error message: Halted Exception: Unable to upload file: The file extension does not match the file type.
It should be noted that only .pdf, .jpg, .png files are permitted. All emails included pdf invoices.
Attached to this post, you will find an image that causes the error in my opinion. I think the file name and file are wronly set.
Does anyone have an idea why this zap does not work?
I appreciate your help and ideas regarding this zap.
Have a nice day.
Page 1 / 1
Hi @NiklasUS
The field “Filename with Extension” expects a file name with extension, but you have a file object mapped.
@NiklasUS
Another thing to check is if there are multiple attachment(s), then those are probably getting put into a .ZIP file.
@Troy Tessalone Thank you for your answer. The emails include solely one single invoice pdf file. I only get a hydrate string so I do not know how to generate the filename with extension. I tried to run a python code to generate the filename with extension. Unfortunately, it did not work.
Do you have any ideas on how to fix this?
I thank you in advance for your help.
@NiklasUS
What about using the email subject line as the file name OR your own combo of static/dynamic values to create a file naming convention?
How are things going on this? Were you since able to get the Zap generating unique filenames with the file extension included?
Keen to ensure you’re all set so please let us know whether you’re still in need of any assistance on this - happy to help further!
I was running into the same issue when setting up a IMAP to Lexware Office Zap and got it fixed by adding the .pdf extension.
Why is the renaming part not optional? Input may be an image file as well, but as per the Zapier process you have to specify an extension that may not match the source file type.
There may also be multiple attachments per mail received as well, where forced renaming makes things more complcated. Feels like a strange decision by Zapier/Lexware.
Hi @timbim, thanks for reaching out here!
I was running into the same issue when setting up a IMAP to Lexware Office Zap and got it fixed by adding the .pdf extension.
Yay! Glad to hear that adding the file extension did the trick.
Why is the renaming part not optional? Input may be an image file as well, but as per the Zapier process you have to specify an extension that may not match the source file type.
I’m not sure of the exact reason behind why the developer’s of the Lexware Office app made that Filename with Extension field required, perhaps it’s required by their API? Or perhaps it was made required so that the file extension is always included to help ensure the file is type always interpreted correctly?
There may also be multiple attachments per mail received as well, where forced renaming makes things more complcated. Feels like a strange decision by Zapier/Lexware.
For multiple attachments that have been zipped it might be worth using an app like Zip Archive API which has a Extract ZIP Archive action that could be used to unzip the files. Next, move the Upload Document for Bookkeeping Purposes (Lewware Office) action inside a loop to have it upload each of the separate files individually. Then you’d select the filename and it’s extension from the Zip Archive API action in the Lexware Office action to ensure that the name and extension dynamically changes depending on the files that’s being uploaded. You can learn more about using loops in a Zap here: Loop your Zap actions.
Can you give that a try and let us know how it goes?