Last active
September 9, 2020 23:26
-
-
Save cweems/f62d11c0223aff80ec724b2795654810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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