Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community,
I have an issue with a Qlik automation that I have recently created that generates an email containing an Excel attachment.
Firstly I have a Qlik Cloud app that allows users to make selections. This has contains as a connection that triggers an automation that takes the user selections and then passes them as variables to the automation. This generates a custom email based on the user selections, also generating a PDF and excel attachment which are also defined by the user selections in the Qlik app.
The app and automation work as expected, however I am seeing an issue with the excel connector in the automation:
In order to attach an excel document to an email with an automation you must update an excel file on either a OneDrive or SharePoint container, as you cannot simply generate the excel file and attach it using Qlik Automate.
I've been able to do that using a connection to a OneDrive folder, and the automation Excel and OneDrive blocks are updating the file in OneDrive. The issue is that while the file on OneDrive receives the instruction to update from the Qlik Automate block, the file on OneDrive doesn't always update the table row instantly after receiving the records from Excel batch block.
This means that when the automation gets to the final Send Mail block to generate the email and attach the excel file from OneDrive, the version being attached contains old, invalid records based on selections from the previous user session. I can see that the batch send of table values is being sent as expected when I check the automation logs, so the issue is with OneDrive not updating the file quickly enough before the automation finishes:
1. The records from the Qlik table are being used to generate the excel attachment correctly – I can see this from the logs for that block in the automation.
2. The next step in the automation flow is to land the generated excel file on OneDrive, because Qlik Cloud Automations need a ‘staging area’ to grab the attachment for the email. This instruction in the automation to update the attachment excel file is also happening as expected.
3. Where I’ve identified the problem is the excel attachment file being updated on OneDrive. I observed the behaviour of this update while watching an automation running to see how long the excel attachment file takes to update.
What I have found is that in most cases the attachment file on OneDrive is being updated with the new records within a few seconds, however in some cases the update is taking longer (up to a minute in some cases), but not all.
4. When this occurs, what this means is that the update on OneDrive finishes after the automation completes, therefore when the file is attached in the ‘Send Mail’ block it is showing the previous session's records.
Ideally the best solution would be if Qlik could introduce functionality that allows the excel file to be generated, and immediately attached to the Send Mail block without having to land the records to a file on OneDrive. If this is not possible is there any guidance that can assist me with the issue of OneDrive not updating the file on time for every run?
Many Thanks