Trigger a flow on button click

Is there a way to trigger a flow at the click of a button?

Basically I want the flow to read a Google Sheet that I prefill with the info needed. Then after that the flow needs to run and use the info in the sheet to setup some accounts for me.

I only need these accounts every once in a while. So I only want to trigger it on command whenever I need it.

1 Like

Welcome to the Community, Romeo!

Absolutely, you can trigger a flow on-demand using the Webhook Trigger feature in Activepieces. This tool allows you to start a flow with a simple webhook URL, which can be integrated into various interfaces, including a button click on a webpage or an application.

Here’s a basic outline to set it up:

  1. Set Up the Webhook Trigger: First, create a webhook trigger in your Activepieces flow. This will generate a unique URL that will act as the starting point for your flow.

  2. Integrate the Webhook URL: Next, integrate this URL with a button on your preferred platform. When the button is clicked, it will send a request to the webhook URL, triggering your flow.

You could even make a shortcut on your desktop to a webpage with this URL to keep it very simple:

https://cloud.activepieces.com/api/v1/webhooks/[your-webhook-code]/?message=start+flow

Replace [your-webhook-code] with your specific webhook code. This way, whenever you access this URL, it will send the message “start flow” to the webhook, initiating your process.

The “start flow” message in the webhook URL isn’t essential for triggering the flow, but it adds a layer of security. It prevents accidental activations, particularly if someone stumbles upon or guesses your webhook URL. You could also have different messages for different branches of your flow if needed:

https://cloud.activepieces.com/api/v1/webhooks/[your-webhook-code]/?message=start+flow+2

Let me know if you’ve any questions!

2 Likes

@Dennis You have great solutions to lots of people’s issues. Thanks for your input. Most of your replies would make excellent tutorials!

1 Like

@Dennis Thank you for your super elaborate explanation!

1 Like

Fantastic! Thanks for your solution!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.