Writing File Using Agent
  • 01 Jul 2022
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Writing File Using Agent

  • Dark
    Light

Article summary

Overview

This tutorial demonstrates how to Write a File to the Client Machine using an Agent. To learn what an Agent is and how to set it up, please refer to Setting Up an Agent.

Example

  1. Begin in the Designer Folder and select CREATE FLOW on the Folder Actions Panel

  2. Name the Flow and select CREATE to proceed to the Flow designer.

    2_NameFlow.png

  3. In the Flow Designer add a Create File step from the Integrations > All Integrations > File category.

  4. In this example, a .txt file (Test.txt) is used to write to the client machine using an Agent.

  5. For data Input into the Create File step, use the Constant Mapping Type and drag and drop the file into the Value box.
  6. For the File Name Input use the Constant Mapping Type. In the Value field, provide a full path to determine where to create a file on the Client Machine, as well as the File Name.

  7. Next, connect the outcome from the Create File step to the End step in the Flow.
  8. Finally, in the Flow Settings change the Behavior Type to Agent Flow.
  9. This completes the Flow. Now save the Flow and close Flow Designer.

  10. Back in the Designer Folder, select CREATE FLOW on the Folder Actions Panel.
  11. Name the Flow and select CREATE to proceed to the Flow Designer.

    9_NameFlow2.png

  12. In the Flow Designer, add a GetAgentList step from the Flows, Rules, Forms and Reports > Flows > Wizards > AgentFlowsAndRules category.

  13. Then, on the outcome from the GetAgentList step, add a Run Agent Flow step from the Flows, Rules, Forms and Reports > Flows > Advanced category.

  14. Set up a Run Agent Flow step. In the Edit Step: Run Agent Flow and select Pick Or Create Flow from the editor.

  15. On the right side, pick the previously created Flow.
  16. In this example select Write File Flow and select PICK.

  17. Use the Select Value Mapping Type for Agent Id Input
  18. Navigate to and expand Agent Sub Folders and GetAgentList step. 
  19. Expand First and then select FolderID.

  20. Connect the outcome from Run Agent Flow to the End step in the Flow. 
  21. This completes the Main Flow. Save the Flow and close the Flow Designer.

  22. Back in the Designer Folder, locate the thumbnail for the Main Flow and click Action > Run Flow on the thumbnail’s menu.

  23. The Flow runs silently with no User Interactions.
  24. Switching to the Client Machine will display the text file created in the location defined in the Write File Flow.

Was this article helpful?