To issue an HTTP response with data from the query string of the request:
- Create a new workflow.
- Choose the HTTP API trigger.
- Click the + button below the trigger step, and choose the option to Run Node.js code.
-
The
$.respond
function lets you issue an HTTP response. In thebody
, you’ll want to include the data you’d like to return (you can inspect data in the trigger step and copy the reference to that data). For example, if the incoming data is in the query string parametername
, you can return the value of that query string parameter like so:
$respond({
status: 200,
body: steps.trigger.event.query.name
});