Overview
You can set up a NetSuite workflow that
generates a signed URL for an eXtendFiles
record automatically, so you don't have to
create links manually. The workflow uses the eXtendFiles Generate Signed URL workflow action and saves the link in the eXtendFiles - Pre-signed URL field on
the eXtendFiles record.
In this article, you build a workflow that
generates a signed URL when an eXtendFiles
record is created. It also runs when an
existing record is edited, but only
creates a signed URL if the eXtendFiles -
Pre-signed URL field is empty. The
example only runs for files with a File
Type of Production Proof, and
the signed URL stays valid for 90 days.
For details on every parameter of the workflow
action, see Generating
eXtendFiles Signed Link/URL via
Workflow.
Prerequisites
- eXtendFiles 1.9.0 or later is
installed.
- Your files are stored in Amazon S3, Azure
Blob Storage, Google Cloud Storage, or
Oracle Cloud Object Storage.
- You're signed in to NetSuite with a role
that can create workflows.
- If you're testing in a sandbox or release
preview account, signed URL generation is
turned on there. See Restricting
File Migration, File Conversion, and
Signed URL Generation in Sandbox &
Release Preview
Environments.
Note: If your files are stored in
Microsoft SharePoint/OneDrive, use the eXtendFiles OneDrive Sharing URL workflow action instead. See Generating
eXtendFiles Shared Link/URL via Workflow
(SharePoint/OneDrive).
Configuration
Create the workflow
- Go to Customization → Workflow →
Workflows → New.
- Enter a Name for the workflow, such
as eXtendFiles Auto Generate Signed
Url.
- In Record Type, select eXtendFiles.
- Set Release Status to Released.
- Under Initiation, select Event
Based.
- Under Event Definition check On
Create and On View Or
Update.
- In Trigger Type, select Before
Record Submit.
- In Event Type, select Create and Edit.

Add the workflow condition
The condition makes sure the workflow only runs
for records that have a file but don't have a
signed URL yet.
- Next to Condition, open the
condition builder.
- Add these three conditions:
- eXtendFiles - URL is not
empty
- eXtendFiles - Pre-signed
URL is empty
- eXtendFiles - File Type
(Custom) = Production
Proof
- eXtendFiles - URL is not
empty
- Click Save to save the condition,
then click Save to save the
workflow.

Note: Production Proof is an
example. Select the file type you want signed
URLs for, or remove the file type condition to
generate signed URLs for all file types.
Add the signed URL action
- In the workflow diagram, click State
1.
- On the Actions subtab, click New
Action, then select eXtendFiles
Generate Signed URL
(Custom).
- In Trigger On, select Entry.
- In Contexts, select all
contexts.
- Under Parameters, set these values:
- Validate user for
generation:
unchecked
- Generate Signed Preview
URL: unchecked
- Generate Thumbnail Signed
URL: unchecked
- Do Not Generate Original File
Signed URL:
unchecked
- Signed URL Validity
(Seconds): 90 days
- Validate user for
generation:
unchecked
- Click Save.
Test the workflow
- Upload a file and set its File Type to Production Proof.
- Open the new eXtendFiles record and confirm the eXtendFiles - Pre-signed URL field has a link.

- If the field is empty, check the Pre-Signed URL Generation Error field for the reason.
Frequently Asked Questions (FAQs)
Q: Why does the workflow also run on view or
update?
A: This lets the workflow add a signed URL to records that existed before you created the workflow, the next time you edit them. Because the workflow only runs when eXtendFiles - Pre-signed URL is empty, a record that already has a signed URL isn't changed.
Q: What happens when the signed URL
expires?
A: The link stops
working after 90 days. The workflow won't
create a new one automatically, because the eXtendFiles - Pre-signed URL field
isn't empty. To get a new link, clear the
field and save the record or you can have the workflow check the Pre-Signed URL Expiry Time field, which shows when the current link expires. Change the condition so the workflow runs when eXtendFiles - Pre-signed URL is empty or Pre-Signed URL Expiry Time is in the past. The workflow then replaces an expired link the next time it runs on that record.
Q: Can I also generate signed URLs for the
preview and thumbnail images?
A:
Yes. Check Generate Signed Preview URL or Generate Thumbnail Signed URL in the
action parameters. If MAKE THUMBNAIL
PRIVATE is checked on the eXtendFiles Configuration page and you
use Amazon S3, you need the thumbnail signed
URL.
Q: Why isn't a signed URL generated in my
sandbox?
A: Signed URL generation
is turned off by default in sandbox and
release preview accounts. Turn on ALLOW
FILE MIGRATION/CONVERSION IN SANDBOX &
RP ACCOUNTS on the eXtendFiles
Configuration page.
Q: How do I choose a different validity
period?
A: You can enter a number of
seconds in Signed URL Validity
(Seconds). For example, 1 day is 86400
and 30 days is 2592000. You can also enter a number of days, such as 90 Days. We recommend keeping the validity period as short as your use case allows. If you
leave Signed URL Validity
(Seconds) empty, eXtendFiles uses Expiry
time for private URLs from the eXtendFiles Configuration page.
