Skip to main content

I am looking for any documentation on integrating ClickFunnels with Airtable.


I have a very simple 2 column Table - Email and a String of Data


I can make Get, Post, Purge to work in Postman, but I was told all I need to do is grab the JS out of the API docs and paste it into a CF HTML element.


This throws a ‘require not defined error’


My research has lead me to believe I need to use NodeJS or NPM or both, but to be honest I have never worked with either…


Is there any documentation on how to get this running?

Hey @Dan_Havey


I don’t know ClickFunnels specifically but I know Node.js/NPM all too well. It sounds like you copy/pasted code that looked something like this:


var Airtable = require('airtable');
Airtable.configure({
endpointUrl: 'https://api.airtable.com',
apiKey: 'YOUR_API_KEY'
});
// etc

The problem is you can’t just throw this JS into an HTML doc and run it. The require is loading the airtable package from NPM – this requires a javascript bundler which might be overkill for ya.


I haven’t tested it, but I’d try something like this in your HTML <head> instead:


<head>
<script src="https://unpkg.com/airtable@0.10.1/build/airtable.browser.js"></script>
</head>

With that, you don’t need the require line. Airtable should be available in any script tags anywhere in your HTML document.


Hope that helps / makes sense?


Anthony


Hey @Dan_Havey


I don’t know ClickFunnels specifically but I know Node.js/NPM all too well. It sounds like you copy/pasted code that looked something like this:


var Airtable = require('airtable');
Airtable.configure({
endpointUrl: 'https://api.airtable.com',
apiKey: 'YOUR_API_KEY'
});
// etc

The problem is you can’t just throw this JS into an HTML doc and run it. The require is loading the airtable package from NPM – this requires a javascript bundler which might be overkill for ya.


I haven’t tested it, but I’d try something like this in your HTML <head> instead:


<head>
<script src="https://unpkg.com/airtable@0.10.1/build/airtable.browser.js"></script>
</head>

With that, you don’t need the require line. Airtable should be available in any script tags anywhere in your HTML document.


Hope that helps / makes sense?


Anthony


Thanks, I was able to get it working using Axios to .Get/.Post my data. They also use a file from unpkg.com.


I will save your solution and test it as well…


Reply