Welcome to the new Box Support website. Check out all the details here on what’s changed.

Automatically copy files

New post

Comments

5 comments

  • sgarlanka

    Hello Sentha,

     

    The Box API would be a good solution to your issue. You can use the copy file endpoint, which allows you to copy a file to any folder. If you want to do this every time a file is uploaded to a specific folder, I would look into the webhook endpoint. You can set a webhook on a folder, so every time a file is uploaded to the folder, an HTTP request with information on the file uploaded is sent to your server. On your server, you can implement logic that calls the copy endpoint on the file if it meets your criteria. The documentation for these endpoints can be found here: https://developer.box.com/reference

     

    I also recommend taking a look at our SDKs, https://github.com/box/sdks. They can help you get up and running quickly. I hope this helps!

    0
    Comment actions Permalink
  • skaruppiah

    Hi,

     

    Thank you for the details. Is there any examples that you can point. I am new to BOX APIs and would like to have this in place as quick as possible. I have been hearing about Relay, will that be of use for this requirement?

     

    Sentha

    0
    Comment actions Permalink
  • sgarlanka

    If you have access to Relay, that is the easier option. If you have access, it will show on your side pane (picture below). Using Relay is very intuitive. Once you click on Relay, click on New Workflow. This will take you through the steps of creating a workflow for your use case.

    Screen Shot 2019-09-23 at 1.46.53 PM.png

    0
    Comment actions Permalink
  • skaruppiah

    Hi,

     

    I have access to relay, however it only allows to move files across folders. Is there an option to Copy, schedule and write criteria's for copying files. 

     

    Can you please share examples of file operations using APIs? 

     

    Thanks

    Sentha

    0
    Comment actions Permalink
  • sgarlanka

    You can write metadata to the copied files or assign tasks with Relay. For more custom editing of the files, you would have to use the API. You can make API requests in multiple coding languages. We have SDKs to make it easy to make these requests in multiple languages. For each SDK we have documentation on how to make calls with it. If you go to any of our SDKs on github (https://github.com/box/sdks) and click docs in the SDK github repository, you will find the documentation. For example, this is the file commands documentation for the Python SDK: https://github.com/box/box-python-sdk/blob/master/docs/usage/files.md#copy-a-file. If there is a specific language you have in mind, I can point you to the documentation.

     

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.