--- alias: user-guide-automation-task-opcua-writefile tags: - automation tasks description: "This task writes data to a file on an OPC UA server" --- # Write File This task write data to a file in OPC UA server using the File Transfer feature. To be used with OPC UA driver in Client mode. ![Screenshot showing a file writing operation with filename input field.](./images/write_file_parameters.png) ## Inputs | Name | Data Type | Description | | -------- | ---------| ------------------------------------------ | | nodeId | `String` | The node id where the file will be written | | rawData | `Buffer` | The raw data to be written in the file | | Activate | `any` | Activate the task | ## Outputs | Name | Data Type | Description | | ------ | --------- | ------------------------------------------------------ | | Success | `Boolean` | If there was no problem emits a true | | Error | `Error` | Error that occurred during the processing of this task | ## Settings This task doesn't have any settings ## Behavior Activate will trigger a message to the driver. The contents of the message are the values received in the inputs. ## Remarks * All the communication with the equipment is handled by the driver in the backend. * The existing content of the file is erased and the new data will be saved.