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}`,
},
})
},
})