.. _macro-file-functions: File Functions -------------------- .. index:: Macro function;fn.write_temporary_local_file * *fn.write_temporary_local_file*: Given a filename and text data, write the data to the filename onto the file system temporary directory. This file is then used as an e-mail ``file_path`` attachment parameter for the *fn.email_html* function. See: :ref:`macro-email-functions`. 1. To use this function, contact VOSS support for Provisioning Workflow modification. .. raw:: html See: Email .. raw:: latex See the Email topic in the Core Feature Guide. 2. The requirement is to: a. Add the ``file_path`` parameter as for example below. b. Modify the ``sendmail`` parameter as for example below. Syntax: :: { "set_var_name": "file_path", "set_var_value": "{{ fn.write_temporary_local_file mydata.csv,pwf.SomeData }}" }, { "set_var_name": "sendmail", "set_var_value": "{{ fn.email_html pwf.to,pwf.from,pwf.email_template, pwf.file_path }}" } where: * the value for example sets ``pwf.file_path``, to be used as a parameter of: :: {{ fn.email_html pwf.to,pwf.from,pwf.template,pwf.file_path }} * ``mydata.csv`` is the example filename * ``pwf.SomeData`` references a string value of ``SomeData`` in an example workflow from where the function is called. .. note:: If the ``SomeData`` text to add to the file is entered in the macro itself, it cannot contain commas.