Skip to main content

Let’s say i have a field named “company name” and a field named “logo”.

I want to create a field that automatically display the corporate logo of the company.


i don’t want to do this manually having to search for the URL of each corporate logo.


example: if i put “airtable” in a new entry, this will automatically display the corporate logo of airtable in the “logo” field


possible hints: http://logo.clearbit.com? zapier?

need something simple & elegant if possible :winking_face:


Thanks.

You could use Airtable’s new SWITCH function.


You would need to create a new field called “Logo URL” and make it a formula field.

The formula would be something like.


SWITCH({company name},“Company A”,“URL Of Company A’s Logo”,“Company B”,"URL Of Company B’s Logo ",“No Match”)


After that create a simple Zap to fetch the URL from the “Logo URL” field and populate the corresponding “Logo” field with the correct company logo image


Where you able to get this to work?


This post is a bit dated, but since the automations have been released, it’s now possible to fetch logos automatically (via the Clearbit API for example).


In my specific case, I wanted Airtable to add a company’s logo as soon as I added their website in a URL type field.


So here’s how I did it:


Trigger



  • “When a record matches conditions”

  • “When Website is not empty and Logo is empty”


Actions




Run a script

let table = base.getTable('TableName');

let query = await table.selectRecordsAsync();

for (let record of query.records) {
// if the attachment field is empty
if(record.getCellValue('Logo') == null && record.getCellValue('Website') != null) {
let recordId = await table.updateRecordAsync(record, {
'Logo':
{ url: 'https://logo.clearbit.com/'+record.getCellValue('Website')}
]
})
}
}


And that’s it, as soon as you add a URL, Airtable will automatically download the company logo.


This post is a bit dated, but since the automations have been released, it’s now possible to fetch logos automatically (via the Clearbit API for example).


In my specific case, I wanted Airtable to add a company’s logo as soon as I added their website in a URL type field.


So here’s how I did it:


Trigger



  • “When a record matches conditions”

  • “When Website is not empty and Logo is empty”


Actions




Run a script

let table = base.getTable('TableName');

let query = await table.selectRecordsAsync();

for (let record of query.records) {
// if the attachment field is empty
if(record.getCellValue('Logo') == null && record.getCellValue('Website') != null) {
let recordId = await table.updateRecordAsync(record, {
'Logo':
{ url: 'https://logo.clearbit.com/'+record.getCellValue('Website')}
]
})
}
}


And that’s it, as soon as you add a URL, Airtable will automatically download the company logo.


Hello !


Thanks a lot for your script. However, it doesn’t seem to filter the files Clearbit can’t found. It looks like it just adds the URL instead.


Would you know a way to fix that, and add the logo only if it is a png/jpg file ?

Anyway, thank you for your work, and for sharing ! It really helps.


This post is a bit dated, but since the automations have been released, it’s now possible to fetch logos automatically (via the Clearbit API for example).


In my specific case, I wanted Airtable to add a company’s logo as soon as I added their website in a URL type field.


So here’s how I did it:


Trigger



  • “When a record matches conditions”

  • “When Website is not empty and Logo is empty”


Actions




Run a script

let table = base.getTable('TableName');

let query = await table.selectRecordsAsync();

for (let record of query.records) {
// if the attachment field is empty
if(record.getCellValue('Logo') == null && record.getCellValue('Website') != null) {
let recordId = await table.updateRecordAsync(record, {
'Logo':
{ url: 'https://logo.clearbit.com/'+record.getCellValue('Website')}
]
})
}
}


And that’s it, as soon as you add a URL, Airtable will automatically download the company logo.


It works for me!! Thanks


This post is a bit dated, but since the automations have been released, it’s now possible to fetch logos automatically (via the Clearbit API for example).


In my specific case, I wanted Airtable to add a company’s logo as soon as I added their website in a URL type field.


So here’s how I did it:


Trigger



  • “When a record matches conditions”

  • “When Website is not empty and Logo is empty”


Actions




Run a script

let table = base.getTable('TableName');

let query = await table.selectRecordsAsync();

for (let record of query.records) {
// if the attachment field is empty
if(record.getCellValue('Logo') == null && record.getCellValue('Website') != null) {
let recordId = await table.updateRecordAsync(record, {
'Logo':
{ url: 'https://logo.clearbit.com/'+record.getCellValue('Website')}
]
})
}
}


And that’s it, as soon as you add a URL, Airtable will automatically download the company logo.


Hi !

Had the same issue.

When the logo is not recognized, the automation keeps running and running et runs out all the automations 😦

why could be the solution ?


Reply