I have a process where I am sending an email using the postmark api and in order to pass the attachments which are stored in a table, they need to be passed as an array in json format.
The attachments or files are stored as a list and I need to create some type of workflow step where each of the files is read and used to create the key value pair that is passed to the api.
Any help in how to achieve this would be greatly appreciated,
I’m assuming you have a data type that stores the reference for each file?
If so, use Do a Search which always returns a list of things, and then using :format as text with a comma delimiter is a great way to build up a JSON list, especially as it handles the trailing comma issue elegantly.
Thank you @code-escapee and @will_ericksson. I have used both your suggestions and getting closer to a solution. I have managed to get the json to form correctly however the actual send email is failing so I am edging closer to solution but not there yet - I hope to be by tomorrow. Many thanks for your help