0

I am using the Zapier cli to set up a new App. I'm using SESSION based authentication because I'd like to exchange some variables for a hashed string. I can clearly see how to pull out auth variables provided in the Zapier interface (such as bundle.authData.MY_FIELD).

In our situation we require the name of the trigger to be included in the authentication/hash call so the token that comes back is per-function not just an "allow all" type scenario.

So we would like to be able to do something like this:

const getSessionKey = async function (z, bundle){

    const response = await z.request({
        method: 'POST',
        url: 'my_url',
        body: {
            function_name: **bundle.triggers.name**
        },
    });

And include the trigger or action name in each authentication call. Is that possible with Zapier?

Antony
  • 3,875
  • 30
  • 32

1 Answers1

0

Trigger/action names are not available in the bundle schema. At best you will have to configure a field where the user can type a string for the Trigger name to be sent over OR if your intent here is to have your app be used only with specific Triggers/actions - instead just pass along a list of the existing triggers/actions as a static dropdown menu so that only the necessary scopes are requested, and update that as you add more triggers/actions.

Owari Jules
  • 126
  • 5