Skip to content

Instantly share code, notes, and snippets.

@degouville
Last active March 5, 2022 17:36
Show Gist options
  • Save degouville/631dea4400b10f449c828b626d364c3a to your computer and use it in GitHub Desktop.
Save degouville/631dea4400b10f449c828b626d364c3a to your computer and use it in GitHub Desktop.
Snippet to add more Values for a Record in Airtable Automations
const getValues = (...fields) => baseValues => {
const setValue = key => [key.toLocaleLowerCase(), baseValues.getCellValue(key)]
const keyValues = fields.map(setValue)
const addedValues = Object.fromEntries(keyValues)
return {
...baseValues,
...addedValues
}
}
records.map(getValues('Email', 'Phone'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment