Hi All,
This is for a Twilio Call IVR.
Is there a way with Airtable-Node Module to filter by Field and not ID.
I guess its kinda like a number look up and give back the value of the field?
1234 gathered digits on a call gets back a field, like status.
The code below returns four IDs
Sorry I am learning to code JS.
exports.handler = async (event, context, callback) => {
try {
const { records } = await airtable.list()
const appointments = records.map((appointment) => {
//console.log(appointment)
const id = appointment
const { name, PIN, Result, Status, Phone_Number } = appointment.fields
console.log(PIN)
// const url = image[0].url
return { id, name, PIN, Result, Status, Phone_Number }
})
callback(null, {
statusCode: 200,
body: JSON.stringify( appointments ),
})
} catch (err) {
callback(null, {
statusCode: 500,
body: 'Server Error',
})
}
}
Thanks