Skip to content

Instantly share code, notes, and snippets.

@cweems
Last active September 9, 2020 23:26
Show Gist options
  • Save cweems/f62d11c0223aff80ec724b2795654810 to your computer and use it in GitHub Desktop.
Save cweems/f62d11c0223aff80ec724b2795654810 to your computer and use it in GitHub Desktop.
exports.handler = function(context, event, callback) {
var Airtable = require('airtable');
var base = new Airtable({apiKey: ''}).base('');
base('Table 1').create([
{
"fields": {
"Phone Number": event.phone,
"Question 1": event.question1,
"Question 2": event.question2,
"Question 3": event.question3
}
}
], function(err, records) {
if (err) {
console.error(err);
return;
}
callback(null, null);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment