Advise how to setup my flow, what function I need to use

My service works as follows: I will wrap the UiPath flow (using UiPath Studio) as an API and publish it to UiPath Orchestrator. When a customer sends a request to this API, it will perform the following steps:

Step 1: Access the web page and download the invoice (.xlsx) to my local download folder. The file will have a name that includes a timestamp.
Step 2: Detect the latest file that was just downloaded and change its format from .xlsx to .csv.
Step 3: Detect that file and upload it to an Azure Storage account.
Step 4: Return a response to the user with the download link provided by the Azure Storage account.

I can complete Step 1 successfully, but I’m having trouble with the following steps:

  • Step 2: I don’t know how to implement this.
  • Step 3: I’m unsure how to do this either.
  • Step 4: I don’t know how to return the response with the download link to the user who called this API. When I use Postman to send a request to my URL (e.g., https://cloud.uipath.com/changweiling/DefaultTenant/orchestrator_/t/71e00041-7444-4f9c-b56e-874de5530d73/test09), I get the following response:
    {
    “key”: “2cc5ae12-0e91-435d-a80c-d88e6d84f7f8”,
    “state”: “Pending”,
    “startTime”: null,
    “creationTime”: “2024-09-26T03:33:36.733Z”,
    “hostMachineName”: “LUCKYC”,
    “organizationUnitId”: 5812139,
    “id”: 404229452
    }
    However, after checking the jobs in UiPath Orchestrator, it shows “Running” and then “Successful,” but this result does not get returned in the Postman response body, nor does it include the link I want to return. Could you please advise on how to resolve this? Thank you.

@Weiling0916

  1. Use wait for download activity which will give you the iutput as the file that is downloaded
  2. To convert xlsx to csv…use read range and read data to datatable and then use write to csv and pass the datattable
  3. Now when you call start job it only starts for getting other details…first you need to call another api get jobs with the returned key to know the status of the job…as the api is async api…so it only starts but end can be detected onlh by get jobs…alternately if your other system has a provision then we can use webhooks as well…
  4. Now for sending url…once you upload the file to blob then return or output variable will have a property to get the url of the file…now use that and assign it to an out argument for the process and that out argument will conrain the url which again can be accessed via get jobs api

Cheers