Skip to content

Instantly share code, notes, and snippets.

@jordansinger
Last active January 21, 2022 11:29
Show Gist options
  • Save jordansinger/1788b0fa378117c5df15ea316a7c3baa to your computer and use it in GitHub Desktop.
Save jordansinger/1788b0fa378117c5df15ea316a7c3baa to your computer and use it in GitHub Desktop.
Importing from Airtable into Figma - Automator automation
{
"id": "kyiz0pkjsx75lgnm6wi",
"name": "Import from Airtable",
"description": "",
"color": "red",
"actions": [{
"id": "kyj1sgob42s5s6o8ef8",
"command": {
"name": "note",
"metadata": {
"note": "Follow the step-by-step guide from https://blog.withdiagram.com/p/importing-from-airtable-into-figma"
},
"title": "READ ME",
"description": ""
},
"actions": []
}, {
"id": "kyiz7zx0e36g482sab6",
"command": {
"name": "setVariable",
"metadata": {
"key": "base_id",
"value": "YOUR_BASE_ID"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj1pyodpnp70z6aa6k",
"command": {
"name": "if",
"metadata": {
"input": "{{base_id}}",
"condition": "is",
"value": "YOUR_BASE_ID"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj1qddlci7hfp9znx5",
"command": {
"name": "showMessage",
"metadata": {
"message": "Replace the base_id variable with your Airtable base ID."
},
"title": "",
"description": ""
},
"actions": []
}, {
"id": "kyj1qgn5qxc5b3yj67g",
"command": {
"name": "stopAutomation",
"metadata": {},
"title": "",
"description": ""
},
"actions": []
}]
}]
}, {
"id": "kyizb2ue1vzmrrg5ass",
"command": {
"name": "setVariable",
"metadata": {
"key": "api_key",
"value": "YOUR_API_KEY"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj1r3vfjd3pwl5a67i",
"command": {
"name": "if",
"metadata": {
"input": "{{api_key}}",
"condition": "is",
"value": "YOUR_API_KEY"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj1r3vftfp7730o04l",
"command": {
"name": "showMessage",
"metadata": {
"message": "Replace the api_key variable with your Airtable API key."
},
"title": "",
"description": ""
},
"actions": []
}, {
"id": "kyj1r3vfwq0r31bl0f",
"command": {
"name": "stopAutomation",
"metadata": {},
"title": "",
"description": ""
},
"actions": []
}]
}]
}, {
"id": "kyizi6b492pon5jrvsi",
"command": {
"name": "fetchURL",
"metadata": {
"method": "GET",
"url": "https://api.airtable.com/v0/{{base_id}}/Furniture?api_key={{api_key}}"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyizvwl3jexs2fsbdbl",
"command": {
"name": "forEach",
"metadata": {
"array": "{{result.records}}"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj06iqcln7rp65xyh9",
"command": {
"name": "createFrame",
"metadata": {
"layerName": "{{item.fields.Name}}",
"x": "{{index}} * 200"
},
"title": "",
"description": ""
},
"actions": [{
"id": "kyj0u8o4d900mmf8c2v",
"command": {
"name": "setAutoLayout",
"metadata": {
"layoutMode": "VERTICAL",
"itemSpacing": 10,
"horizontalSizingMode": "AUTO",
"verticalSizingMode": "AUTO",
"horizontalAlignItems": "MIN",
"verticalAlignItems": "MIN",
"alignment": "PACKED",
"paddingLeft": 10,
"paddingRight": 10,
"paddingTop": 10,
"paddingBottom": 10
},
"title": "",
"description": ""
},
"actions": []
}, {
"id": "kyj12iowuvczl7pzl3m",
"command": {
"name": "insertImageFromURL",
"metadata": {
"url": "{{item.fields.Images.0.url}}"
},
"title": "",
"description": ""
},
"actions": []
}, {
"id": "kyj1a7bwd7xi6r8io0e",
"command": {
"name": "createText",
"metadata": {
"fontFamily": "Inter",
"fontStyle": "Regular",
"textAlignHorizontal": "LEFT",
"textAlignVertical": "CENTER",
"textDecoration": "NONE",
"textCase": "ORIGINAL",
"textAutoResize": "WIDTH_AND_HEIGHT",
"characters": "{{item.fields.Name}}"
},
"title": "",
"description": ""
},
"actions": []
}]
}]
}]
}],
"createdAt": 1642441092211
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment