Paragon workflows can be used to create actual API Endpoints that extend functionality on top of your own API or database. In these use cases, the Response step allows you to send data back to the service (e.g. your web app or API) that sent the initial request to trigger your workflow.
For example, you might have an app where users upload documents that you want to process using OCR. You could use a Paragon workflow to create an endpoint that gets called by your app when a document is uploaded. The workflow could then send the document to an OCR API, save the results to your database, and send a response back to your app so it can display the processed document text in your app's UI.
To add a response to your workflow, click the "+" button in the workflow canvas and choose the Response step in the sidebar. You can only add a response to workflows with an API Endpoint trigger.
There are two components to a Response: it's status code and it's data.
In general, you should send the
200: OK status code if the workflow ran successfully, you can choose from other commonly used status codes for more specific cases (e.g. if a Request failed, send an error response).
You can choose what data to send the response body using the key-value table to reference data from previous steps in the workflow.