Exhibit 5.1
Nicole C. Brookshire
+1 617 937 2357
April 4, 2022
UiPath, Inc.
452 5th Avenue, 22nd Floor
New York, NY 10018
Re:    Registration on Form S-8
Ladies and Gentlemen:
We have acted as counsel to UiPath, Inc., a Delaware corporation (the “Company”), in connection with the filing of a Registration Statement on Form S-8 (the “Registration Statement”) with the U.S. Securities and Exchange Commission, covering the offering of up to 32,473,538 shares (the “Shares”) of the Company’s Class A common stock, par value $0.00001 per share (“Common Stock”) consisting of (a) 27,061,282 shares of Common Stock issuable pursuant to the Company’s 2021 Equity Incentive Plan (the “2021 EIP”) and (b) 5,412,256 shares of Common Stock issuable pursuant to the Company’s 2021 Employee Stock Purchase Plan (together with the 2021 EIP, the “Plans”).
In connection with this opinion, we have examined and relied upon (a) the Registration Statement and the related prospectuses, (b) the Company’s Amended and Restated Certificate of Incorporation and Amended and Restated Bylaws, each as currently in effect, (c) the Plans and (d) originals or copies certified to our satisfaction of such other records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. We have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies thereof, the accuracy, completeness and authenticity of certificates of public officials and the due authorization, execution and delivery of all documents by all persons other than the Company where authorization, execution and delivery are prerequisites to the effectiveness thereof. As to certain factual matters, we have relied upon a certificate of an officer of the Company and have not independently verified such matters.
Our opinion is expressed only with respect to the General Corporation Law of the State of Delaware. We express no opinion to the extent that any other laws are applicable to the subject matter hereof and express no opinion and provide no assurance as to compliance with any federal or state securities law, rule or regulation.
On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Shares, when sold and issued in accordance with the Plans, the Registration Statement and the related prospectuses, will be validly issued, fully paid, and nonassessable (except as to Shares issued pursuant to certain deferred payment arrangements, which will be fully paid and nonassessable when such deferred payments are made in full).
We consent to the filing of this opinion as an exhibit to the Registration Statement.

Cooley LLP
By: /s/ Nicole C. Brookshire    
    Nicole C. Brookshire

Cooley LLP 500 Boylston Street Boston, MA 02116-3736
t: (617) 937-2300 f: (617) 937-2400 cooley.com