erik
New Member
Posts: 6
|
Post by erik on May 6, 2024 14:53:08 GMT
Quite often, you want to include different images in an exported PDF depending on the user who created the PDF. For example, you may want to include different companies' logos, or different blueprints depending on the user. However, the Google Sheet function IMAGE() doesn't work with Molnify's generateFile action. So, how do you do this?
A functionality of Google Sheets is that you can insert images into cells (Insert -> Image -> Insert image in cell). So, in your Google Sheets template file, create columns with rows of the form lookupKey : image. E.g. customer
| image
| TestCompany 1
|
| TestCompany 2
|
| TestCompany 3
|
|
Then, given that you have the correct lookupKey (for example, "TestCompany 1") from your Molnify App, then e.g. a VLOOKUP would retrieve the image corresponding to the lookupKey into its cell. Resize the cell containing the VLOOKUP to the correct size for the image, and you're done!
|
|