# SFTP, CSV tools by Workato, and Quickbase recipe

This use case guides you through connecting SFTP, CSV tools by Workato, and Quickbase to create a powerful automation.

# What does this recipe do?

This recipe fetches a CSV file from an SFTP server, parses the file content, and updates the corresponding records in a Quickbase table.

flowchart TD subgraph Configuration[" "] direction TB subgraph Scheduler[&nbsp Scheduler by Workato New recurring event trigger &nbsp] t1(Trigger) --- setup1(setup) end subgraph SFTP[&nbsp SFTP Download file action &nbsp] Action1(Action) --- setup2(setup) end subgraph CSV[&nbsp CSV tools by Workato Parse CSV action &nbsp] Action2(Action) --- setup3(setup) end subgraph Quickbase[&nbsp Quickbase Update record action &nbsp] Action3(Action) --- setup5(setup) end end CreateRecipe([Create recipe]) -- Configure your recipe --> Configuration --> Workflow([Automated workflow]) Scheduler --> SFTP --> CSV --> Quickbase classDef default fill:#fff,stroke:#67eadd,stroke-width:2px; classDef WorkatoTeal fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef SubgraphDash fill:#e1fffc,stroke:#f66,stroke-width:2px,color:#000,stroke-dasharray: 5 5 class t1,setup1,setup2,setup3,setup4,setup5,Action1,Action2,Action3,x,xx,CreateRecipe,Workflow WorkatoTeal class Scheduler,SFTP,CSV,Quickbase SubgraphDash

# How can I use this recipe?

This recipe can be applied in various ways to automate workflows, including but not limited to the following use cases:

  • Inventory tracking: Regularly fetch inventory updates from a supplier’s SFTP server, allowing you to maintain accurate stock levels in your Quickbase database.
  • Sales data management: Automate the import of daily sales reports from an SFTP server, ensuring that your Quickbase records are always up to date with the latest sales figures.
  • Order processing: Regularly download order details from an SFTP server and update your order management system in Quickbase. This helps in streamlining order fulfillment and tracking.
  • Customer information updates: Automatically update customer records based on new data received in a CSV file, ensuring that your team always has the most current information at their fingertips.

# Create your recipe

Complete the following steps to create a recipe that fetches a CSV file from an SFTP server, parses its content, and updates records in a Quickbase table:

USE CASES ARE INTENDED AS EXAMPLES ONLY

This use case is intended to serve as an example. Recipe modifications such as trigger and action configuration and conditional logic may require adjustments if you plan to include this recipe in your own workflow.

1

Sign in to your Workato account and go to the workspace project where you plan to add the recipe.

2

Set up connections for SFTP and Quickbase using the steps in the following sections. Note that the CSV tools by Workato connector doesn't require a connection setup:

Set up your SFTP connection.

# Using SSH keys for SFTP authentication

SFTP is built on the Secure Shell Protocol (SSH), which enables you to use SSH keys in your authentication flow. SSH keys can be used with a user ID and password or independently to authenticate Workato with your SFTP server. This enhances the security of your connection by using SSH encryption for your public and private keys.

# Connection setup

Complete the following steps to set up your SFTP connection:

1

Click Create > Connection and select SFTP as your connection.

2

Provide a name for your connection in the Connection name field.

Connection setupSFTP connection setup

3

Use the Location drop-down menu to select the project where you plan to store the connection.

4

Use the Connection type drop-down menu to select the connection method you plan to use. You can select your on-premise group name or select Cloud to use a direct connection.

5

Select the authentication method in the Auth type field. Available options include the following:

  • Username/password
  • Public/private key pair
  • Public/private key pair and password
6

Enter the username for the SFTP server you plan to connect to in the Username field.

7

Provide additional authentication information based on your selection from the Auth type field:

  • Username/password or Public/private key pair and password authentication: Enter the password associated with the SFTP server username in the Password field.

  • Public/private key or Public/private key pair and password authentication: Enter the SSH private key for the SFTP server in the Private key field. The private key must be in OpenSSH format (opens new window). Specify SecureShellPrivateKeyFormat.NewOpenSecureShell as the format parameter when saving the key. Refer to the Private key example format section for more information.

8

Enter your SFTP server address in the Hostname field.

9

Enter the port for the SFTP server in the Port field. The default port for SFTP is 22.

10

Optional. Enter the hash of the SSH public key in the Host key fingerprint field. Workato supports SHA256 and MD5 encryption. For on-premise connections, contact your SFTP server administrator to obtain the public key in Base64 format.

11

Optional. Enter the size of the buffer used for file transfers in the Transfer buffer size field.

12

Optional. Specify whether the SSH connection should be closed at the end of each transaction in the Force close field. Toggle this option if your SFTP server connection becomes unresponsive. Otherwise, leave it blank.

13

Optional. Set the SFTP protocol version to use in the Explicit version field.

14

Use the Append operations supported? drop-down menu to specify whether your SFTP provider supports append or modify operations. The default setting is Yes.

15

Click Connect.

Set up your Quickbase connection.

Workato supports the following authentication methods for connecting to Quickbase:

# User-token authentication

1

Click Create > Connection and select Quickbase as your connection.

2

Provide a unique Connection name that identifies the Quickbase instance to which it is connected.

3

Use the Location drop-down menu to select the project where you plan to store the connection.

4

Enter your Quickbase subdomain. This is most often your company name.

5

Use the User-token authentication? drop-down menu to select Yes.

6

Provide your User token. Refer to the Generate a user token section for more information.

7

Click Connect.

# Username and password authentication

1

Click Create > Connection.

2

Search for and select Quickbase in the New connection page.

3

Provide a unique Connection name that identifies the Quickbase instance you plan to use.

Quickbase connection setupSet up your Quickbase connection with a username and password

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Enter your Quickbase subdomain. This is most often your company name.

6

Use the User-token authentication? drop-down menu to select No.

7

Provide your Quickbase username and password.

8

Click Connect.

3

Click Create > Recipe.

4

Provide a name for your recipe in the Name field and select the project in which you plan to store the recipe from the Location drop-down menu.

5

Select Run on a schedule as your starting point and click Start building.

Set up your recipeSet up your recipe

This creates a new recipe with the Scheduler by Workato New recurring event trigger. This trigger doesn't require a connection.

6
Set up your Scheduler by Workato New recurring event trigger.

This step sets the interval or custom schedule for how frequently this recipe should run.

Complete the following steps to set up this trigger:

1

Click the trigger in the recipe editor.

Click the triggerClick the trigger

2

Choose an interval or custom schedule in the Time unit field. Available options include Minutes, Hours, Days, Weeks, Months, or Custom schedule.

3

Specify how frequently this trigger should run. The field you configure depends on your selection in the Time unit field:

  • If Custom schedule is not selected: Define the repeat schedule in the Trigger every field. Enter whole numbers only. The minimum value accepted is five minutes.

  • If Custom schedule is selected: Enter the Cron expression in the following format:

    [minute] [hour] [day of month] [month] [day of week]
    
4

Optional. Select the timezone in the Timezone field. If left blank, America/Los_Angeles is used.

5

Optional. Set the start date and time in the Start after field, or leave the field blank to activate the trigger immediately after starting the recipe. You can't change this value after you run or test the recipe.

6

Click Save.

7

Click the + Add step button and select Action in app.

Add actionClick Add step > Add action in app

8
Set up your SFTP Download file action.

This action retrieves the contents of a CSV file from your SFTP server.

Complete the following steps to set up this action:

1

Search for SFTP in the Choose an app search box.

Choose an appChoose SFTP as your app

2

Select Download file as your action.

Select the Download file actionSelect the Download file action

3

Select the SFTP connection you created in the preceding steps.

4

Enter the full path of the CSV file, including the file extension, in the File path field. For example, if your file is located at /sftp/Customer_orders.csv, enter this value in the field.

5

Optional. Choose the encoding value to set it explicitly in the Encoding drop-down menu.

6

Optional. Use the Download file in one go drop-down menu to determine whether the file should be downloaded in one go if your SFTP server doesn't support multi-part downloads. The maximum size supported is 200 MB. The default value is set to No. Don't select this option for larger file downloads.

7

Click Save.

9

Click the + Add step button and select Action in app.

10
Set up your CSV tools by Workato Parse CSV action.

This action maps the file contents from the previous step (a CSV-formatted string) and parses it into an array of lines. It can convert up to 50,000 lines.

Complete the following steps to set up this action:

1

Search for and select CSV tools by Workato in the Choose an app search box.

Choose CSV tools by WorkatoChoose CSV tools by Workato

2

Select Parse CSV as your action.

Select the Parse CSV actionSelect the Parse CSV action

3

Map the File contents | Step 2 datapill to the CSV contents field.

Map the File contents datapillMap the File contents datapill

4

Go to the Column delimiter field to select a separator or enter a custom character to define how columns are separated in the CSV contents.

Available options include comma, space, tab, colon, semicolon, and pipe.

5

Use the CSV contents contain header line? drop-down menu to specify whether the CSV contains a header line that should be excluded from parsing.

6

Describe the CSV columns in the Header schema. You can either upload a sample CSV file to input all column names at once or manually add column names by clicking Add column name.

This example uses the following schema:

Order ID,Customer Name,Customer Email,Product SKU,Product Name,Quantity Ordered,Order Status,Shipping Address,Order Total,Order Date
7

Optional. Specify how Workato should keep track of columns in the Keep track of columns by field. You can select Column order or Column name. Configure this field if your expected CSV contents have varying column order or names.

8

Optional. Specify the character used to quote CSV cell values in the Quote character field. Available options include Double quote, Single quote, and None. Choose None if no quote character is used.

9

Optional. Specify the encoding of the file in the Encoding of the file content field. By default, encoding is set to UTF-8.

10

Click Save.

11

Click the + Add step button and select Repeat for each.

Add repeat for eachClick Add step > Repeat for each

How does the Repeat for each condition work?

A Repeat for each loop repeats one or more actions for each item in a list. The loop ends automatically when the entire list is processed.

flowchart TD A(["Start"]) --> B("Is there another line \n from the parsed CSV to process?") B -- "Yes" --> C("Update record in Quickbase") B -- "No" --> D(["End loop"]) C --> B classDef default fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef WorkatoPink fill:#f3c1c2,stroke:#f3c1c2,stroke-width:1px; class A,D WorkatoPink
12
Set up your Repeat for each loop.

This step processes each line in the CSV file through a Repeat for each loop. After configuring the loop, you will define the action to take for each line. In this use case, the recipe will update records in a Quickbase table.

Complete the following steps to set up your Repeat for each loop:

1

Map the Lines | Step 3 datapill to the Input list field.

Map the Lines datapillMap the Lines datapill

2

Ensure One item at a time is selected in the Repeat mode field.

3

Ensure that No is selected in the Clear step output field.

4

Click Save.

13
Set up your Quickbase Update record action.

This step runs inside the Repeat for each loop. It updates the corresponding record in the Quickbase table for each processed line from the parsed CSV file.

Complete the following steps to set up this action:

1

Click Select an app and action.

2

Search for and select Quickbase in the Choose an app search box.

Choose Quickbase as your appChoose Quickbase as your app

3

Select Update record as your action.

Select the Update record actionSelect the Update record action

4

Select the Quickbase connection you created in the preceding steps.

5

Select an application from your Quickbase account in the Application drop-down menu.

6

Provide the Application token if the app is configured to require a token for data access.

Refer to the Quickbase documentation (opens new window) to learn how to retrieve your app token.

7

Select a table from the list or enter the table ID in the Table/Table ID field.

8

Use the Record ID field to specify the identifier or primary key of the record to be modified.

9

Use the Table field list drop-down menu to select the table fields you plan to update. Workato supports a maximum of 150 fields from a Quickbase table.

10

Map the datapills from the Foreach (Step 4 output) datatree to their respective fields. For example, map the Customer Name datapill to the Customer Name field, and the Customer Email datapill to the Customer Email field.

Map Repeat for each loop outputMap Repeat for each loop output

11

Click Save.

Your SFTP, CSV tools by Workato, and Quickbase recipe is ready to test and implement.


Last updated: 11/4/2024, 6:09:46 PM