FAQs
Common Errors & Troubleshootin...
Common issues in 'Create Folder' flow action and how to resolve them
overview when creating a folder, you may occasionally encounter different types of errors depending on permissions, flow action configurations, or input parameters this article covers the most common errors that can occur when executing a flow with the create folder action, along with clear steps to troubleshoot and resolve them each example includes a description of the issue, the reason it occurred, and the steps we took to resolve it example 1 error code 429 – too many requests to dropbox 1\ what was the issue? a customer reported receiving multiple error notification emails from salesforce whenever a new record triggered the folder creation process the error consistently appeared at the step where a new dropbox folder was supposed to be generated instead of completing the folder creation and linking it back to salesforce, the flow returned the following error message cldfs cloudfilesexception {"statuscode" 429,"message" "something went wrong"} in some instances, a new folder was still created in dropbox, but it did not have the expected naming format, and the salesforce record was not automatically connected to the new folder, forcing the customer to manually attach it the issue only occurred intermittently, usually when multiple application records were created at the same time 2\ why did it occur? the error was caused by dropbox api rate limiting dropbox applies a limit on how many api (folder creation) requests can be made within a short time window when the flow attempted to create several folders simultaneously (for example, when multiple users submitted forms around the same time), the number of requests exceeded dropbox’s allowed threshold as a result, dropbox returned a 429 “too many requests” error , which caused salesforce to stop the process prematurely and the flow to fail 3\ how was it fixed? to resolve this issue and prevent future failures, we implemented the following changes updated the flow to use the create folder (async) action instead of the synchronous create folder action the asynchronous action queues folder creation requests and processes them in the background rather than firing them all at once this prevents the flow from hitting dropbox’s request limits configured the folder created event once the async action completes, it triggers a platform event indicating that the folder has been successfully created created a secondary flow that listens for this event this second flow can then execute the create attachment action to properly attach the newly created dropbox folder to the corresponding salesforce record testing confirmed that switching to the async action eliminated the 429 errors, as requests were distributed more efficiently and no longer exceeded dropbox’s limits example 2 error code 404 something went wrong 1\ what was the issue? a customer reported running into repeated errors when attempting to create folders using the cloudfiles integration in salesforce each time the flow tried to execute the folder creation step, the process failed and displayed the following error cldfs cloudfilesexception {"statuscode" 404,"message" "something went wrong"} because of this, the folder creation process would stop midway, preventing the automation from completing successfully this not only disrupted their workflow but also left related records without their expected folder structure in sharepoint 2\ why did it occur? there are 2 potential reasons for this type of error the parent folder (under which record folder needs to be created) being referenced in the flow does not actually exist in external storage the integration user connected to cloudfiles does not have the necessary permissions to access or create the folder when either of these situations is true, cloudfiles is unable to complete the folder creation request, which caused salesforce to throw the error during execution on further investigation, the issue was traced back to the cloudfiles integration user access 3\ how was it fixed? upon reviewing the setup, it was confirmed that the problem was related to folder access permissions for the integration user specifically, the integration user didn’t have sufficient rights to create or modify the folder in question once the permissions were corrected and the integration user was given the required access, the folder creation action began working as expected after the fix, the flow was able to create the necessary folders without errors, and the automation continued smoothly example 3 expired sharepoint connection causing folder creation failure 1\ what was the issue? the customer reported that their "folder creation for new opportunity” flow failed when trying to create a folder in sharepoint the error message showed an apex error occurred cldfs jsonparse missingkeyexception no match found for {} because of this error, the folder creation automation stopped and no new folders were being created for opportunities 2\ why did it occur? the error occurred because the sharepoint connection in cloudfiles had expired when the connection between salesforce (via cloudfiles) and sharepoint expires cloudfiles can no longer authenticate with sharepoint the api call that attempts to create or update a folder in sharepoint fails this results in missing or invalid keys being passed back to salesforce, which then triggers the cldfs jsonparse missingkeyexception error in the flow so, even though the salesforce flow setup was correct, the expired connection prevented successful execution 3\ how was it fixed? to resolve the issue, the customer followed these steps reconnect the sharepoint account navigate to document management > libraries > sharepoint > disconnect and then reconnect this re established authentication between cloudfiles and sharepoint refresh the flow after reconnecting, the flow in salesforce was refreshed so it could pick up the new connection verification the customer retried the folder creation automation the error no longer occurred, and folders were successfully created in sharepoint as expected example 4 create folder action error due to dml executed first in the flow 1 what was the issue? a salesforce flow was set up to automatically generate structured sharepoint folders through cloudfiles the intent of this flow was straightforward whenever a new record was created or updated, it would first check whether a corresponding folder already existed, and if not, create one however, during execution, the cloudfiles create folder action consistently failed resulting in the following error an apex error occurred system calloutexception you have uncommitted work pending please commit or rollback before calling out because of this, the flow could not continue to subsequent steps, resulting in incomplete automation and disruption to the intended folder creation process 2\ why did it occur? the folder creation was failing because of the order in which actions were placed in the salesforce flow specifically, a record update (dml operation) was executed before the cloudfiles create folder action salesforce enforces a strict rule that external callouts, like cloudfiles actions, cannot be made after a pending database operation (dml) has already been performed in this case, the flow first updated a field on the record and then attempted to call the cloudfiles create folder action since the record update was processed before the folder creation step, salesforce blocked the callout, which resulted in the folder creation failure 3\ how was it fixed? the resolution involved adjusting the order of operations within the salesforce flow specifically, the cloudfiles create folder action needed to be executed before any record update (dml) actions were performed by restructuring the sequence in this way, the flow first completed the external callout to cloudfiles to create the sharepoint folder, and only after that step succeeded, it moved on to updating fields on the salesforce record this sequencing ensured the flow worked in line with salesforce’s platform guidelines, which require external callouts to finish before any dml operations are carried out once the change was implemented, the folder creation action executed successfully, the automation continued without interruption, and the overall process worked as originally intended another scenario of this same error occurred when mixing loops, dml operations, and callouts in the same flow you can read about it in our article here system calloutexception you have uncommitted work pending please commit or rollback before calling out docid\ mvkpsuonihlacc93xbcr