Airtable Support will not respond to questions or feedback submitted via this form. To help us provide better experiences for all Airtable users, please provide your input on how we can improve this article."; } else { feedbackText.innerHTML = "
Airtable Support will not respond to questions or feedback submitted via this form. To help us provide better experiences for all Airtable users, please provide your input on how we can improve this article.";
}
}
}
});
/*Remove Articals cant find articles*/
$(window).on("load", function() {
console.log('load', $('a[href="/docs/hidden-beta-test"]'));
$('a[href="/docs/hidden-beta-test"]').parent().css({
display: "none"
});
$('a[href="/docs/testing-accordionssearch"]')
.parent()
.css({
display: "none"
});
});
/*Article Redirection*/
$(document).ready(function() {
var paths = {
'/docs/use-case-planning-product-launches-in-airtable': 'https://www.airtable.com/templates/product-launch/expbtFa3nsLpIQfgk?_gl=1*10sqfpf*_ga*Njg4Nzg3NzAxLjE2Nzc2MTgzMTE.*_ga_HF9VV0C1X2*MTY4MzEyNzk0MS4xNTIuMS4xNjgzMTI5MTkwLjAuMC4w',
'/docs/use-case-bug-issue-tracking-in-airtable': 'https://www.airtable.com/templates/bug-tracker/expOzMycWirMsUOTL?_gl=1*zggk4h*_ga*Njg4Nzg3NzAxLjE2Nzc2MTgzMTE.*_ga_HF9VV0C1X2*MTY4MzEyNzk0MS4xNTIuMS4xNjgzMTI5Njk2LjAuMC4w',
'/docs/use-case-managing-your-pr-outreach-in-airtable': 'https://www.airtable.com/templates/pr-outreach/exp9jwY6qLUv5dQ0A?_gl=1*3dlo39*_ga*Njg4Nzg3NzAxLjE2Nzc2MTgzMTE.*_ga_HF9VV0C1X2*MTY4MzEyNzk0MS4xNTIuMS4xNjgzMTI5NTQxLjAuMC4w',
};
var currentPath = window.location.pathname;
if (paths[currentPath]) {
window.location.href = paths[currentPath];
}
});
//END EXTERNAL REDIRECTS
// Event logging
function firePageView() {
var _location = window.location;
var referrer = document.referrer;
var beaconUrl = new URL("https://airtable.com/internal/page_view");
beaconUrl.searchParams.append("location", _location);
if (referrer) {
beaconUrl.searchParams.append("referrer", referrer);
}
// Cross-domain POST requests won't include cookies, which breaks
// session tracking, but an tag pointing at this endpoint will include cookies.
var img = document.createElement("img");
img.src = beaconUrl.toString();
img.style.display = "none";
img.height = "1";
img.width = "1";
document.head.appendChild(img);
}
try {
firePageView();
} catch (err) {
console.log(err);
}
/* Sendsafely Document Upload Script */
/*
(() => {
// Use your sandbox URL and dropzone ID
const SENDSAFELY_URL = "https://airtable-sandbox.sendsafely.com";
const DROPZONE_ID = "WW2ZU7l69cmlr3kIVPVsGrhJ1PkLlOB1QC6FutQBHl4";
// IMPORTANT: Use the correct SDK URL for your sandbox
const SENDSAFELY_SDK_SRC = "https://files.sendsafely.com/js/SendSafelyDropzoneModal.js";
const FORETHOUGHT_EVENT_ID = "customer_sendsafely_attachment_upload";
let myDropzoneModal = null;
let sdkLoaded = false;
// Load SDK as module
function loadSendSafelySDK() {
if (sdkLoaded) {
console.log("SDK already loaded");
return Promise.resolve();
}
return new Promise((resolve, reject) => {
// Check if already exists
if (document.getElementById("sendsafely-sdk")) {
console.log("SDK script already in DOM");
sdkLoaded = true;
resolve();
return;
}
console.log("Loading SendSafely SDK from:", SENDSAFELY_SDK_SRC);
const script = document.createElement("script");
script.id = "sendsafely-sdk";
script.src = SENDSAFELY_SDK_SRC;
script.type = "module"; // CRITICAL: Must be module type
script.onload = () => {
console.log("SendSafely SDK loaded successfully");
sdkLoaded = true;
// Give the module time to initialize
setTimeout(() => {
if (typeof SendSafelyDropzoneModal !== "undefined") {
console.log("SendSafelyDropzoneModal is available");
resolve();
} else {
console.error("SendSafelyDropzoneModal not found after load");
reject(new Error("SendSafelyDropzoneModal not available"));
}
}, 500);
};
script.onerror = (error) => {
console.error("Failed to load SendSafely SDK:", error);
reject(error);
};
document.head.appendChild(script);
});
}
// Create the dropzone modal
function createDropzoneModal() {
if (myDropzoneModal) {
console.log("Dropzone modal already exists");
return myDropzoneModal;
}
console.log("Creating SendSafely Dropzone Modal");
try {
myDropzoneModal = new SendSafelyDropzoneModal({
dropzoneId: DROPZONE_ID,
url: SENDSAFELY_URL,
uploadButtonText: "Upload Files",
showSubmissionConfirmation: false,
showSubmissionList: false,
onUploadComplete: (url) => {
console.log("Upload complete, URL:", url);
// Reset the dropzone for next use
if (myDropzoneModal && myDropzoneModal.resetDropzone) {
myDropzoneModal.resetDropzone();
}
// Complete the Forethought event with the file URL
if (typeof window.Forethought === "function") {
window.Forethought("widget", "triggerEventComplete", {
identifier: FORETHOUGHT_EVENT_ID,
payload: {
sendsafely_link: url
}
});
} else {
console.error("Forethought function not available");
}
},
onUploadError: (type, message) => {
console.error("Upload error:", type, message);
alert("SendSafely upload failed: " + (message || type) + ". Please notify the agent.");
// Still complete the event but with empty URL
if (typeof window.Forethought === "function") {
window.Forethought("widget", "triggerEventComplete", {
identifier: FORETHOUGHT_EVENT_ID,
payload: {
sendsafely_link: ""
}
});
}
},
onCancel: () => {
console.log("Upload cancelled by user");
// User closed modal without uploading - resume workflow with no link
if (typeof window.Forethought === "function") {
window.Forethought("widget", "triggerEventComplete", {
identifier: FORETHOUGHT_EVENT_ID,
payload: {
sendsafely_link: "" // blank means they cancelled
}
});
}
}
});
console.log("Dropzone modal created successfully");
return myDropzoneModal;
} catch (error) {
console.error("Error creating dropzone modal:", error);
alert("Failed to initialize upload widget. Please refresh and try again.");
return null;
}
}
*/
/*
// Listen for Forethought events
window.addEventListener("message", async (event) => {
const eventData = event.data;
if (!eventData || !eventData.event) return;
console.log("Received message event:", eventData.event);
// Pre-load SDK when widget opens
if (eventData.event === "forethoughtWidgetOpened") {
console.log("Forethought widget opened - preloading SDK");
try {
await loadSendSafelySDK();
} catch (error) {
console.error("Failed to preload SDK:", error);
}
return;
}
// Handle the trigger event to show upload modal
if (eventData.event === "forethoughtTriggerEventAction") {
console.log("Trigger event action:", eventData.name);
if (eventData.name === FORETHOUGHT_EVENT_ID) {
console.log("Matching event - showing upload modal");
try {
// Ensure SDK is loaded
await loadSendSafelySDK();
// Create modal if needed
if (!myDropzoneModal) {
createDropzoneModal();
}
// Show the modal
if (myDropzoneModal && myDropzoneModal.showModal) {
console.log("Calling showModal()");
myDropzoneModal.showModal();
} else {
console.error("Modal or showModal method not available");
}
} catch (error) {
console.error("Error handling trigger event:", error);
alert("Failed to open upload widget. Please try again or contact support.");
// Complete event with empty payload so workflow continues
if (typeof window.Forethought === "function") {
window.Forethought("widget", "triggerEventComplete", {
identifier: FORETHOUGHT_EVENT_ID,
payload: { sendsafely_link: "" }
});
}
}
}
}
});
console.log("SendSafely integration initialized for Forethought");
})();
*/
/*Forethought Chat Widget*/
/*
$(document).ready(function() {
setTimeout(function() {
const searchParams = new URLSearchParams(window.location.search);
const TRUSTED_ORIGIN = "https://support.preview.airtable.document360.io/";
var head = document.head || document.getElementsByTagName("head")[0],
forethoughtscript = document.createElement("script");
forethoughtscript.setAttribute(
"src",
"https://solve-widget.forethought.ai/embed.js",
);
forethoughtscript.setAttribute("type", "application/javascript");
forethoughtscript.setAttribute(
"data-api-key",
"fb79790e-3422-4897-8d83-9b96f33ae881",
);
forethoughtscript.setAttribute("data-ft-User-Persona", "helpCenter");
forethoughtscript.setAttribute("data-ft-Case-Origin", "Help Center");
forethoughtscript.setAttribute("data-ft-workflow-tag", "hc");
forethoughtscript.setAttribute("config-ft-ignore-persistence-parameters", "data-ft-url");
forethoughtscript.setAttribute("data-ft-Url", window.location.href);
document.head.appendChild(forethoughtscript);
window.addEventListener("message", (event) => {
if (event.data.event === "forethoughtWidgetLoaded") {
if (searchParams.get("contact_support") === "true") {
Forethought("widget", "open");
}
}
if (event.origin !== TRUSTED_ORIGIN || !event.isTrusted) {
return;
}
});
}, 2000);
});
*/
/* Chat Widget D360 fix 1/12/26
(function () {
const API_KEY = "fb79790e-3422-4897-8d83-9b96f33ae881";
const searchParams = new URLSearchParams(window.location.search);
function injectForethought() {
if (document.getElementById("ft-widget-script")) return;
window.addEventListener("message", function (event) {
if (event.origin.includes("forethought.ai")) {
if (event.data?.event === "forethoughtWidgetLoaded") {
if (searchParams.get("contact_support") === "true") {
// Polling to ensure the global function is attached to window
const checkFunction = setInterval(() => {
if (typeof window.Forethought === "function") {
window.Forethought("widget", "open");
clearInterval(checkFunction);
}
}, 100);
}
}
}
});
const script = document.createElement("script");
script.id = "ft-widget-script";
script.src = "https://solve-widget.forethought.ai/embed.js";
script.setAttribute("data-api-key", API_KEY);
script.setAttribute("data-ft-User-Persona", "helpCenter");
script.setAttribute("data-ft-Case-Origin", "Help Center");
script.setAttribute("data-ft-workflow-tag", "hc");
script.setAttribute("data-ft-Url", window.location.href);
document.head.appendChild(script);
}
if (document.readyState === "complete" || document.readyState === "interactive") {
injectForethought();
} else {
window.addEventListener("DOMContentLoaded", injectForethought);
}
})();
*/
/*Accordion*/
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
if (!this.classList.contains("active")) {
closeAll();
}
this.classList.toggle("active");
var panel = this.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
});
}
function openAll() {
for (i = 0; i < acc.length; i++) {
acc[i].classList.add("active");
acc[i].nextElementSibling.style.maxHeight =
acc[i].nextElementSibling.scrollHeight + "px";
}
}
function closeAll() {
for (i = 0; i < acc.length; i++) {
acc[i].classList.remove("active");
acc[i].nextElementSibling.style.maxHeight = null;
}
}
/* Documentation page link change as per the language*/
function injectLanguageCodeIntoContentLinks(code) {
const contentBlock = document.getElementById("main-content");
const links = contentBlock?.querySelectorAll("a") ?? [];
for (const link of links) {
const originalHref = link.getAttribute("href");
const documentReferenceRegex =
/^(?:\/\/support.airtable.com)?(?:\/v1)?\/docs\/([^/]+)$/;
if (originalHref && originalHref.match(documentReferenceRegex)) {
const newHref = originalHref.replace(
documentReferenceRegex,
`/docs/${code}/$1`
);
link.setAttribute("href", newHref);
}
}
}
$(document).on("click", ".project-language-dropdown .dropdown-item", function(e) {
var path = window.location.pathname;
var pathSegments = path.split('/');
setTimeout(function() {
injectLanguageCodeIntoContentLinks(pathSegments[2]);
}, 1000);
});
/* INTL reroute to foreign language homepage when user is on a foreign language page */
document.addEventListener("click", function(event) {
var clickedElement = event.target;
if (clickedElement.tagName === "A") {
var url = clickedElement.href;
const langCode = layoutData.langCode;
if (
url === "https://support.airtable.com" &&
foreignLanguageCodes.includes(langCode)
) {
window.open(`https://support.airtable.com/v1/${langCode}`, "_blank");
}
}
});
/* Interface legacy features popup */
(function() {
/* Add the URLs where you want the popup to appear */
const targetArticles = [
'https://support.airtable.com/docs/legacy-interface-designer-functionality',
/* Add more URLs here as needed */
];
/* Track which pages have shown the popup this session */
const shownOnPages = new Set();
function getCurrentUrl() {
return window.location.href.split('?')[0].split('#')[0];
}
function isTargetPage(url) {
return targetArticles.some(targetUrl =>
url === targetUrl || url === targetUrl + '/'
);
}
function showPopup() {
const currentUrl = getCurrentUrl();
/* Skip if not a target page or already shown on this page */
if (!isTargetPage(currentUrl) || shownOnPages.has(currentUrl)) return;
/* Mark this page as shown */
shownOnPages.add(currentUrl);
/* Create overlay */
const overlay = document.createElement('div');
overlay.style.cssText = `
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
`;
/* Create popup box */
const popup = document.createElement('div');
popup.style.cssText = `
background: white;
padding: 24px 32px;
border-radius: 8px;
max-width: 450px;
text-align: center;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
`;
/* Add message */
const message = document.createElement('p');
message.textContent = 'Interface elements are a legacy Interface Designer feature. Newer interface layout types offer a different interface building experience.';
message.style.cssText = `
margin: 0 0 20px 0;
font-size: 16px;
line-height: 1.5;
color: #333;
`;
/* Add close button */
const button = document.createElement('button');
button.textContent = 'I understand';
button.style.cssText = `
background: #2d7ff9;
color: white;
border: none;
padding: 10px 24px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
`;
button.onclick = function() {
overlay.remove();
};
/* Assemble and add to page */
popup.appendChild(message);
popup.appendChild(button);
overlay.appendChild(popup);
document.body.appendChild(overlay);
}
/* Show popup on initial page load */
showPopup();
/* Listen for client-side navigation */
let lastUrl = getCurrentUrl();
/* Check for URL changes using multiple methods */
/* Method 1: Listen for popstate (back/forward buttons) */
window.addEventListener('popstate', function() {
setTimeout(showPopup, 100);
});
/* Method 2: Poll for URL changes (catches all navigation types) */
setInterval(function() {
const currentUrl = getCurrentUrl();
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
showPopup();
}
}, 500);
})();
/* Sierra chat widget */
$(document).ready(function () {
function loadSierra() {
return new Promise((resolve, reject) => {
window.sierraConfig = {
display: 'corner',
hideOnClose: true,
titleBarEndConversationButton: true,
includeIconButtonTooltips: true,
canEndConversation: true,
canStartNewChat: true,
inactivityTimeoutSeconds: 600,
variables: { workflowTag: 'hc'},
dimensions: { width: '400px', height: '680px'},
launcher: {
proactiveBanner: {
showAfterSeconds: 0,
hideOnMobile: true,
}
},
onLoad: () => resolve(window.sierra),
};
const script = document.createElement('script');
script.src = 'https://sierra.chat/agent/EODsQjYBm7QgruIBm7Qgr0Olgka9SFehulVI6AhVuaw/embed';
script.type = 'module';
script.onerror = reject;
document.head.appendChild(script);
});
}
async function loadVariables() {
const response = await fetch('https://airtable.com/supportChatSettings', {
credentials: 'include',
headers: { 'x-requested-with': 'xmlhttprequest' },
});
if (!response.ok) {
throw new Error('Failed to load support chat settings');
}
const supportChatSettings = await response.json();
return Object.fromEntries(
Object.entries(supportChatSettings)
.filter(([key, value]) => value !== null && value !== undefined)
.map(([key, value]) => [key, String(value)])
);
}
Promise.all([loadSierra(), loadVariables()])
.then(([sierra, variables]) => {
sierra.updateVariables(variables);
if (document.location.search.includes('contact_support=true')) {
sierra.openChatModal();
}
})
.catch(() => {});
});