![]() ![]() This includes the space ID, URL of the Management API, content type IDs, as well as the input object from Airtable. The first few lines are defining some variables that we need later in the code. Let’s break down the code to understand what is happening. This script populated the Contentful space with the data from Airtable. Fortunately, Contentful has a REST API to interact with the Management API! I wrote the following code in the “Run a Script” action. Hence, using the Contentful Management JavaScript SDK was not possible. While working with this action, I learned that you can’t import npm packages. However, it has an action that allows you to run custom JavaScript code. Airtable doesn’t have an in-built action for Contentful, so there isn’t a no-code or even a low-code solution available just yet. The next step is to create an action that will add the content to Contentful. Once the form is submitted, the workflow gets triggered. But, below I’m sharing the code snippet that populates Contentful with the data. It is out of the scope of this article to walk you through all the steps of creating the automation workflow. Every time a developer submitted the final form, this workflow would get triggered. ![]() I created a workflow in Airtable to handle the above scenario. It allows you to trigger actions when data is entered or updated. A better and faster solution is to use automation within Airtable. To overcome this, you can either create automation workflows that run at a certain interval of time, or check for new data and then process that data. This means that whenever data is created or updated, you can’t trigger external events. If you’re using Airtable, you might know that Airtable doesn’t have webhooks (at the time of writing this article). To get this data added automatically to Contentful, I created a workflow in Airtable. The data from the final form submission was in Airtable, and not Contentful, yet. There was no need to create an automation workflow to handle it! Whenever a developer submitted this form with the details, it now got saved in Airtable. This enabled us to capture the data in Airtable itself. ![]() Now that we were using Airtable to manage the data, I re-created the template for the final submission form in Airtable. The other time-consuming task was entering the final details of the submissions to Contentful, and I wanted to automate it next. The first task was now automated! Connecting Airtable to Contentful The above workflow replaced the manual labor of entering the data into Google Sheets. All I had to do now was to check if the submission was valid and if it was, update the Valid column in Airtable. The workflow would then add the new record to the Airtable base, and also send a Slack message to notify us. This workflow would get triggered whenever there was a submission made to the Developer Showcase form. After setting up the table and the individual views, I created an automation workflow in Zapier. The migration to Airtable also involved creating automation to handle the form submissions. Having an individual view made it easy for my team to go in, view the project, leave their thoughts, and vote. For every member of the team, I created a view that would list all the submissions that they haven’t viewed. All of us decide if a submission should be added to the Developer Showcase. ![]() I created a base in Airtable for the Developer Showcase which would contain all the details - from the initial form submission details to the final details.Įveryone in the DevRel team is involved in the showcase. Luckily for me, we already use Airtable at Contentful for various projects. I was looking for a tool that would allow me to easily create automation workflows, configure different views, and also have an easy-to-use API. My first step was to migrate to a spreadsheet-like tool that provided better features than Google Sheets. Now that I recognized two tasks that could be automated, I started looking for solutions. I take pride in being lazy! My laziness helps me find solutions that make my tasks joyful. There were situations where I would enter the information in the wrong columns when I was in a hurry. I recognized this as another task that could be automated.īoth the tasks were manual, which meant that the chances of human error were high. We had to manually add the relevant information shared via the form to the Contentful space. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |