Building integrations

Can I trigger an integration from a button instead of a workflow step?

Yes. Start the integration with the Webhooks by Kissflow trigger and call its webhook URL from the button's action, using kf.api with a relative path inside an app.

How-to

Short answer: Yes. Build the integration on the Webhooks by Kissflow trigger, then call its webhook URL from the button's action. This works for cases such as generating a PDF for review within the same workflow step.

Why it happens

Workflow triggers fire only when an item moves, for example when it's submitted or advances to the next step. A webhook trigger fires whenever its URL is called, so a button can start the integration at any time.

How to fix it

  1. Create an integration with the Webhooks by Kissflow trigger and select Catch a webhook (POST).
  2. Copy the webhook URL.
  3. Add the actions you need, for example Generate a PDF document from the Kissflow Process connector, and turn on the integration.
  4. Call the webhook when the button is clicked:
    • On an app page, select the button, add the On click event in Event properties, and choose JavaScript action.
    • On a form inside an app, add a Button field and write an On Click field event. Field events are available on the Enterprise plan.

See Webhooks by Kissflow for the trigger setup.

If you call the webhook from a page or custom component in an app

Use kf.api() with the relative path, not the full URL. Calling the full URL causes CORS errors.

kf.api(`/integration/2/${kf.account._id}/webhook/<webhook_id>`)

Replace <webhook_id> with your webhook's ID.

Related answers