You can use this code snippet to convert Airtable url(entire column) to Images(Attachment) column
- Git clone codebase
git clone [email protected]:alishahlakhani/airtable-urls-to-image-api.git
- Change directory
cd ./airtable-urls-to-image
- Install dependencies
npm install
oryarn
- Update
configs.js
. Openconfigs.js
and updated the following urls
module.exports = {
// This is your Airtable API KEY
API_KEY: "Insert your key here",
// This is the base you are updating
BASE_ID: "Insert your base Id",
// This is the base name you're updating
BASE_NAME: "Insert your base name",
// This is the view which you're updating
VIEW_NAME: "Insert your view name",
// [IMPORTANT] - Column name where image urls are present
URL_TEXT_COLUMN_NAME: "Insert column name where images are in url format",
// [IMPORTANT] - Column name where image will be uploaded. Please ensure that the type of this column is 'Attachment'
URL_ATTACHMENT_COLUMN_NAME:
"Insert column name where image type is Attachment",
};
- Run code & Voila
npm run start