$.send
functions.
$.send
is an object provided by Pipedream that exposes destination-specific functions like $.send.http()
, $.send.s3()
, and more. This allows you to send data to destinations programmatically, if you need more control than the default actions provide.
Let’s use $.send.http()
to send an HTTP POST request like we did in the Action example above. Add a new action, then search for “Run custom code”:
Create a new HTTP endpoint URL (try creating a new Pipedream workflow and adding an HTTP trigger), and add the code below to your code step, with the URL you created:
$.send.http()
function.
Again, it’s important to remember that Destination delivery is asynchronous. If you iterate over an array of values and send an HTTP request for each:
await
the execution of the HTTP requests in your workflow. We’ll collect every $.send.http()
call and defer those HTTP requests, sending them after your workflow finishes.
$.send
isn’t directly available to actions like it is for workflow code steps. Instead, you use $.send
to access the destination-specific functions: