Back

[Solved]Trigger another function when one function returns response

  • 0
  • Functions
  • Web
Ajit Singh
5 Jun, 2023, 11:49

Can I trigger another function when one function returns a response.

For example if I have a function Function A can I trigger function B when A completed execution and pass return data as a parameter.

TL;DR
You can trigger another function, function B, when function A completes execution and pass the return data as a parameter. In order to achieve this, you can use the `functions.*.executions.*.update` event to trigger the function B when the status of function A changes. After the trigger, inside function B, you can check if function A has finished successfully and then access the returned data. You can find more information about function events here: [link to documentation].
Binyamin
5 Jun, 2023, 12:10

As of now it think that functions trigger are disabled in the cloud.

But, in general you can make a function trigger when any status change of a different function. Using the functions.*.executions.*.update event.

Then inside the B function you'll need to check that the function has finished successfully and then check the data.

You can find all functions events here: https://appwrite.io/docs/events#functions-events

Ajit Singh
5 Jun, 2023, 13:19

[Solved]Trigger another function when one function returns response

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more