This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contents of file 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// **How to set up** | |
// | |
// Create two inputData fields: dedupeKey and storageKey | |
// Generate a unique UUID here: https://www.uuidgenerator.net/ and paste it into the storageKey field | |
// Use a new and unique storageKey for each deduper you set up as it will use the maximum capacity of a storage account | |
// Map the ID (or other unique value) from your Zap's Trigger into the dedupeKey field | |
// Add a Filter after this Code Step to only continue the Zap if 'previouslySeenValue' is false | |
const { dedupeKey, storageKey } = inputData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add as many Input Data fields as you like above as comma seperated text or mapped line items (will be | |
converted to comma seperated text). This code will find each Input Data field and output an array of | |
objects with the same structure that can be used to "Fork" the Zap. | |
Example: https://cdn.zappy.app/9de81901f3750ef26bcbbd0737b0937b.png */ | |
// get Input Data field names | |
let keys = Object.keys(inputData) | |
let data = []; | |
// loop through each Input Data field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let authHeaders = { | |
'Authorization': `Bearer ${inputData.apiKey}`, | |
'Content-Type': 'application/json' | |
}; | |
let options = { | |
method: 'GET', | |
headers: authHeaders | |
}; | |
let url = `https://api.airtable.com/v0/${inputData.base}/${inputData.table}?maxRecords=${inputData.maxRecords}&view=${inputData.view}`; |