Is There Any Free Push Service Supported by Pipedream?

This topic was automatically generated from Slack. You can find the original thread here.

is there any free push service supported by pipedream

I’m not sure which specific push service you’re looking for, but Pipedream has integrations with many apps and services. You can browse the available integrations at https://pipedream.com/apps. If you don’t find the push service you’re looking for, you can submit a new integration request at New Pipedream Integration Request.

i mean something like send notification from phone or browser

If you’re looking to send browser notifications, you can use a service like Pushover or OneSignal. Pipedream has integrations with both of these services, which you can find at: - Pushover: https://pipedream.com/apps/pushover - OneSignal: https://pipedream.com/apps/onesignal You can use the available actions for these services within your Pipedream workflows to send notifications.

so i want to set up a trigger that can be activated by send notification from my phone or browser. is it possible?

Yes, it’s possible to set up a trigger that can be activated by sending a notification from your phone or browser. You can use an HTTP trigger in your Pipedream workflow. This trigger generates a unique URL that you can make a request to (e.g., using a GET or POST request) from your phone or browser to trigger the workflow. Here’s an example of a workflow with an HTTP trigger: ```
export default { name: “HTTP Trigger Example”, description: “This workflow is triggered by an HTTP request”, triggers: { http: { type: “$.interface.http”, customResponse: true, }, }, async run({ event, steps, $ }) { // Your actions or code steps go here }, };

were there any build-in solution?

something like zapier’s chrome extension?

Pipedream doesn’t have a dedicated Chrome extension like Zapier. However, you can still achieve similar functionality by using an HTTP trigger in your Pipedream workflow. This trigger generates a unique URL that you can make a request to (e.g., using a GET or POST request) from your browser or a custom extension to trigger the workflow. This way, you can create custom integrations and triggers based on your requirements.

is it possible to write a chrome extension myself to use as HTTP trigger

Yes, it’s possible to create a Chrome extension that sends an HTTP request to a Pipedream workflow’s HTTP trigger. First, create a workflow with an HTTP trigger in Pipedream. This will generate a unique URL for your workflow. Then, in your Chrome extension, make a request (GET or POST) to this URL when you want to trigger the workflow. This way, your extension can interact with Pipedream and activate the workflow as needed.

import ytdl from “ytdl-core”;
import fs from “fs”;

export default defineComponent({
async run({ steps, $ }) {
const videoUrl = steps.query_database.$return_value.results[0].properties.Link.url;
const videoPath = /tmp/video.mp4;

**const** videoInfo = **await** ytdl.getInfo(videoUrl);
**const** videoFormat = ytdl.chooseFormat(videoInfo.formats, { quality: "lowest" });

**await** **new** Promise((resolve, reject) => {
  ytdl(videoUrl, { format: videoFormat })
    .pipe(fs.createWriteStream(videoPath))
    .on("finish", resolve)
    .on("error", reject);
});

**const** videoTitle = videoInfo.videoDetails.title;
**const** videoDescription = videoInfo.videoDetails.description;

**return** { videoPath, videoTitle, videoDescription };

},
});

for the above code, please help me export video id as well

It looks like you have a Pipedream component that uses the ytdl-core library to download a video from a given URL, save it to the /tmp directory, and return the video’s path, title, and description. Here’s the same code with proper formatting: import ytdl from "ytdl-core"; import fs from "fs"; export default defineComponent({ async run({ steps, $ }) { const videoUrl = steps.query_database.$return_value.results[0].properties.Link.url; const videoPath = `/tmp/video.mp4`; const videoInfo = await ytdl.getInfo(videoUrl); const videoFormat = ytdl.chooseFormat(videoInfo.formats, { quality: "lowest" }); await new Promise((resolve, reject) => { ytdl(videoUrl, { format: videoFormat }) .pipe(fs.createWriteStream(videoPath)) .on("finish", resolve) .on("error", reject); }); const videoTitle = videoInfo.videoDetails.title; const videoDescription = videoInfo.videoDetails.description; return { videoPath, videoTitle, videoDescription }; }, }); This component downloads the video from the videoUrl and saves it to the /tmp directory with the filename video.mp4. It then returns the video’s path, title, and description.

Sure, I’ve updated the code to include the video ID in the returned object: ```
import ytdl from “ytdl-core”; import fs from “fs”; export default defineComponent({ async run({ steps, $ }) { const videoUrl = steps.query_database.$return_value.results[0].properties.Link.url; const videoPath = /tmp/video.mp4; const videoInfo = await ytdl.getInfo(videoUrl); const videoFormat = ytdl.chooseFormat(videoInfo.formats, { quality: “lowest” }); await new Promise((resolve, reject) => { ytdl(videoUrl, { format: videoFormat }) .pipe(fs.createWriteStream(videoPath)) .on(“finish”, resolve) .on(“error”, reject); }); const videoTitle = videoInfo.videoDetails.title; const videoDescription = videoInfo.videoDetails.description; const videoId = videoInfo.videoDetails.videoId; return { videoPath, videoTitle, videoDescription, videoId }; }, });