I'm getting a weird error when trying to use my workflow to send out a visualforce email template. The visualforce email template generates a PDF attachment (from VF component) and works fine when I send and test merge fields etc. So i set up a workflow based on a field update to send out this email to all related contacts of the custom object; when I tick the field and click save it doesn't allow me to save the records and throws this error:
Unable to Finish Processing Request An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact email@example.com. Please indicate the URL of the page you were requesting as well as any other related information. We apologize for the inconvenience. Thank you again for your patience and assistance. And thanks for using salesforce.com! Error ID: Data Not Available
I've done some troubleshooting myself and have identified the root of the problem. In my PDF attachment, I display a QR code at the bottom. when I take this out the workflow works fine. The QR code is created in a custom field (formula(TEXT)) using a free QR code API site "https://api.qrserver.com/v1/create-qr-code/?size=75x75&data="
The site is added in remote sites.
Everything has worked fine so far and the QR code hasn't had any issues displaying. It's only when I try to trigger the workflow it fails.
I've also tried using any other external image, whilst adding in the matching site in remote sites; and still get the same error.