Skip to content

Instantly share code, notes, and snippets.

Contents of file 1
// **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;
@timschafli
timschafli / fork_a_zap.js
Last active May 31, 2020 17:40
Fork a Zap in a Zapier Javascript Code Step
/* 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
@timschafli
timschafli / Get Records in Airtable and Fork Zap.js
Created May 27, 2020 23:56
Get Records in Airtable and Fork Zap
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}`;