Why does the Airtable_oauth app return a 404 error when referencing a previous step instead of hardcoding the Base ID?

This topic was automatically generated from Slack. You can find the original thread here.

noticing a bug when referencing a Prop for the Airtable_oauth app. If you hardcode the Base ID, it works as expected. If you reference a previous step, it shows a 404 error since the Base ID returns as ‘undefined’

code:

import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    airtable_oauth: {
      type: "app",
      app: "airtable_oauth",
    },
    baseId: {
      type: "string",
      label: "Base ID",
      description: "The ID of the base to retrieve records from",
    },
    tableName: {
      type: "string",
      label: "Table Name",
      description: "The name of the table to retrieve records from",
    },
    filterByFormula: {
      type: "string",
      label: "Filter By Formula",
      description: "The formula used to filter records. The formula will be evaluated for each record, and if the result is not 0, false, \"\", NaN, [], or #Error! the record will be included in the response",
      optional: true,
    },
  },
  async run({steps, $}) {
          console.log(this.baseId)

    return await axios($, {
      url: `https://api.airtable.com/v0/${this.baseId}/${encodeURIComponent(this.tableName)}`,
      params: {
        filterByFormula: this.filterByFormula,
      },
      headers: {
        Authorization: `Bearer ${this.airtable_oauth.$auth.oauth_access_token}`,
      },
    })
  },
})

Hi, thank you for raising this. This issue has been awared by Pipedream team and it’s on the backlog. Please subsribe to the announcements channel to be noticed when it landed

are there workarounds?

Hi , I think the workaround right now is to use Node.js/Python code step with Airtable API, or clone a new workflow for each base

that example is using the node.js code step with airtable api

Wait, Leo, this doesn’t look like an issue of not being able to evaluate step references for async options or additionalProps though, right? Why would that not work?

is it possible you changed the name of that previous step and didn’t test it again, before testing the airtable_oauth step using the step reference?

i didn’t change any names, no

Can you try,

  1. Testing the previous step
  2. Then copy the path
  3. Then test the airtable_oauth step again, using that step reference

Danny, apologize I didn’t read the issue through.

I tried to reproduce on my side but couldn’t (image below), would you mind tap “Test” on the previous step client_settings then copy the path and test the airtable_oauth again per Danny suggestion?