Help

Automation Script Error: input.config.table is not a function

Topic Labels: Automations Integrations
933 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_Fitzpatri
4 - Data Explorer
4 - Data Explorer

I tried copying a script from the extensions section and using it in a script for an automation.

Safe to say it did not work and gave me multiple errors.

What would be the easiest way to transfer the code from one to another? @kuovonne 

Script:

let config = input.config({
title: '📎 Convert attachments to URLs',
description: 'Output comma-separated URLs for all attachments and write to another field for each record. Can be used for sending URLs to third-party integration services.',
items: [
input.config.table('Links and Tools', {
label: 'Links and Tools',
description: 'Select a table with records that have attachments you want URLs for',
}),
input.config.field('Attachment', {
label: 'Attachment field from the selected table',
parentTable: 'Links and Tools',
description: 'Select the attachment field from the table above you want URLs for'
}),
input.config.view('Grid view', {
label: 'View from the selected table',
parentTable: 'Links and Tools',
}),
input.config.field('Attachment URL', {
label: 'Field to output the attachment URLs to',
parentTable: 'Links and Tools',
description: 'A long text field is recommended. A comma-separated list of URLs will be generated here'
})
]
});
// Codes the selections above to variables for the script
let selectedTable = config.Links_and_Tools;
let selectedField = config.Attachment;
let selectedView = config.Grid_view;
let fieldToEdit = config.Attachment_URL;
2 Replies 2

You can check out this article I wrote about converting a script from scripting extension to an automation script. It is part of various resources that I am publishing here.


On the other hand, why are you using an automation script to put attachment urls into a field? The attachment urls will expire in a few hours so there is no point in keeping them.

Is there a work-around to these attachments having to expire?

If I were to provide a static table to a team member, the attachment URL would only be active for a few hours before changing. As it stands the script that I was running as an extension was converting an attachment to a URL, and after further consideration I am looking for a way to create a static URL. Is this possible?