Skip to main content
Best answer

Getting Zapier bundle.authData from authentication step to use in a trigger or action dynamic field.


Hey all, 

We’re building a Zapier app, and in the authentication step for our app, we’re creating the below response which is fine:

 

I know that you can use 

bundle.authData.xxxxx

to pull in the auth data in later api calls for triggers/actions, I thought so anyways?!

How could I call the field “adalo_id” with the bundle.authData into my action or trigger api calls? 

I tried both

bundle.authData.adalo_id

and 

bundle.authData.adaloId

but those are not working…

More precisely, I need to get the “adalo_id” and place it at the end of the url for the endpoint in my api call/settings for a trigger, see below code >

// Configure a request to an endpoint of your api that
// returns custom field meta data for the authenticated
// user.  Don't forget to congigure authentication!

const options = {
  url: 'https://api.adalo.com/v0/apps/xxxxxxxxxxxxxxxxx-492f-b6fc-2xxxxxxxxb474679/collections/t_xxxxxxxxxxxxxxaeb2a5/?{{bundle.authData.adalo_id}}',
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer 7xxxxxxx7yvhxxxxxxxb5xxxxx'
  },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();

 

What am I missing or how can I do this?

Thank you!!!

Best answer by SamBBest answer by SamB

Just wanted to follow up here as noticed @MichaelNCS also reached out to our Support Team about this and they identified the reason why the call to the “adalo_id” field wasn’t working.

It appears that it’s not possible to use computed fields with the API Key authentication method. In order to access a computed field, the OAuth v2 or Session Auth method would need to be used instead.

The following guides go into more detail on working with Computed Fields, OAuth v2 and Session Auth:

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

  • Author
  • Beginner
  • 1 reply
  • April 20, 2021

any chance on getting some help please?


Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • April 26, 2021

Assuming you’re using OAuth or Session type authentication - have a look at adding those as “computed fields” https://zapier.github.io/zapier-platform/#computed-fields.  


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7472 replies
  • Answer
  • August 18, 2021

Just wanted to follow up here as noticed @MichaelNCS also reached out to our Support Team about this and they identified the reason why the call to the “adalo_id” field wasn’t working.

It appears that it’s not possible to use computed fields with the API Key authentication method. In order to access a computed field, the OAuth v2 or Session Auth method would need to be used instead.

The following guides go into more detail on working with Computed Fields, OAuth v2 and Session Auth: