Last active
March 5, 2022 17:36
-
-
Save degouville/631dea4400b10f449c828b626d364c3a to your computer and use it in GitHub Desktop.
Snippet to add more Values for a Record in Airtable Automations
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
| 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