Sending a Response

Workflows triggered by a Request can send a custom response.

Overview

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 enrich contacts pulled from their CRM. You could use a Paragon workflow to create an endpoint that gets called by your app to pull contacts from their CRM. The workflow could then send the enriched data to your database, save the results, and send a response back to your app so it can display the enriched contacts 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.

Note: You can only add responses to Request-triggered workflows.

Defining response data

There are two components to a Response: its status code and its 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.

Sending files in responses

You can use the Response step to send files to your application. To do so, specify the dataType, data, and mimeType fields.

Last updated