- finished add_document on Zapier interface
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = {
|
||||
label: 'Document Name',
|
||||
type: 'string',
|
||||
helpText: 'The name you want to give the Document.',
|
||||
required: false,
|
||||
required: true,
|
||||
list: false,
|
||||
altersDynamicFields: false,
|
||||
},
|
||||
@@ -136,16 +136,16 @@ module.exports = {
|
||||
Object.assign(baseMetadata, bundle.inputData.additional_metadata);
|
||||
}
|
||||
|
||||
// Get the file content
|
||||
const filePromise = z.stashFile(bundle.inputData.file);
|
||||
const file = await filePromise;
|
||||
// const temp_url = z.stashFile(bundle.inputData.file);
|
||||
// Get the file URL from Zapier
|
||||
const tempFileUrl = await z.stashFile(bundle.inputData.file);
|
||||
// Log the temporary URL for debugging
|
||||
z.console.log('Temporary URL created:', tempFileUrl);
|
||||
|
||||
// Create request data as an object
|
||||
const requestData = {
|
||||
catalog_id: bundle.inputData.catalog_id,
|
||||
language: bundle.inputData.language,
|
||||
temp_url: file, // This will be handled by z.request automatically
|
||||
temp_url: tempFileUrl,
|
||||
user_metadata: JSON.stringify(baseMetadata),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user