I previously had this automation working but has for some reason stopped working. Although the file name is uploaded, the isn't actually anything in the image file. Process is click on the 'Process PSDs' button and this fires a webhook to make, which then uploads to s3.
This is the script that runs on button click:
// ----------------------------------------------------------------------------
// 🚨 STEP 1. 🚨
// Change 'Test' to the name of your table.
let table = base.getTable('Pre Mock Prod (PB)');
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// 🚨 STEP 2: 🚨
// Change the following url to your Zapier webhook.
// To get a Zapier webhook, click the below link, then choose "Catch Hook" as the trigger event
// https://zapier.com/app/editor?create=true&template__0__selected_api=WebHookAPI
let webhook_url = 'https://hook.eu1.make.com/o2svol1v14x7i3xoezllg390l8decek5'
// ----------------------------------------------------------------------------
let record = await input.recordAsync('Process PSDs', table);
let record_id = record.id;
// ----------------------------------------------------------------------------
// 🚨 STEP 3. 🚨
// Add all the fields you want to send over to Zapier. Follow the format:
// let record_FIELDNAME = record.getCellValue(FIELDNAME);
let record_mockup_id = record.getCellValue('mockup_id');
let record_mockUpFiles = record.getCellValue('mockUpFiles');
// ----------------------------------------------------------------------------
const customFetch = async (
record,
) => {
const url = webhook_url;
console.log("F url:", url);
const options = {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
record_id: record_id,
// ----------------------------------------------------------------------------
// 🚨 STEP 4. 🚨
// Pass in the fields you want to use in the Zapier Zap
// Format it like --
// record_FIELDNAME: record_FIELDNAME,
record_mockup_id: record_mockup_id,
record_mockUpFiles: record_mockUpFiles,
// ----------------------------------------------------------------------------
}),
};
const response = await remoteFetchAsync(url, options);
const result = await response.json();
return result;
};
let result = await customFetch(record);
console.log(result);
output.markdown(`# You have selected ${result}.`);
This is what I have in Make which could be where the issue lies.
I've tried all sorts of configurations but I just get the same empty file uploaded to s3.