Configuring Workato to Automatically Send a Thnks

This guide walks you through automatically triggering the sending of a Thnks using Workato recipes.

Prerequisites

  • Access to the Thnks API.

  • Thnks API Key (Authorization Token).

  • URL for Thnks API endpoint.

  • Administrative access to your Workato workspace.

Setup

1

Prepare HTTP Request Data

Before configuring your Workato recipe, ensure you have the following details:

1

Thnks API URL

https://api.thnks.com/api/v1/gift_requests

2

HTTP Method

POST

3

Data (JSON format)

Here’s an example of the JSON payload you will need to include in the HTTP action. Replace the placeholders with dynamic data from Workato variables:

{  
  "gift_id": <GIFT_ID>,  
  "recipients": [  
    {  
      "email": "{{email}}",  
      "first_name": "{{first_name}}",  
      "last_name": "{{last_name}}",  
      "message": "Thank you for your time and support!",  
      "gift_redeem_type": "email"  
    }  
  ]  
}  
  • Replace <GIFT_ID> with the Thnks ID of the gift you want to send.

  • Use Workato variables (e.g., {{email}}, {{first_name}}) to populate recipient data dynamically.

4

Headers

You will need to add the following headers in the HTTP action:

  • Content-Type: application/json

  • Authorization: Your Thnks API key (Authorization Token).

2

Create a Recipe in Workato

1

Log into Workato and Create a New Recipe

Open your Workato workspace and click + Create recipe to start a new recipe.

2

Define the Trigger

Choose a trigger based on the source system or event, such as:

  • New Event: Trigger when a new event occurs in a connected app like Salesforce, HubSpot, or a webhook.

  • Scheduled Trigger: Run the recipe at a specified interval.

3

Add an HTTP Action

  • Add an Action step and select HTTP.

  • Configure the HTTP action as follows:

    • Method: POST

    • Endpoint URL: https://api.thnks.com/api/v1/gift_requests

    • Headers:

      • Content-Type: application/json

      • Authorization: Enter your Thnks API Key.

    • Request Body: Copy the JSON payload mentioned above and replace placeholders with Workato variables.

  • Save the action.

4

Add Conditional Logic or Additional Steps (Optional)

Use additional actions or conditions to customize the workflow, such as:

  • Conditional Logic: Add an If/Else condition to determine when the Thnks gift should be sent.

  • Data Transformations: Use the Data Mapping feature to format or manipulate variables.

  • Error Handling: Add steps to retry or log errors in case of API call failure.

3

Test and Activate the Recipe

1

Run the Recipe in Test Mode

Use Workato’s test mode to simulate the recipe execution and ensure the HTTP action sends data correctly to the Thnks API.

2

Check Execution Logs

Verify the response from the Thnks API in the Job History or execution logs to ensure the gift was sent successfully.

3

Activate the Recipe

Once verified, activate the recipe to enable automated Thnks sending.

4

Best Practices

1

Error Handling

Include error-handling steps to retry failed API calls or log issues for manual review.

2

Security

Use Workato’s Lookup Table or Encrypted Fields to securely store your API Key and other sensitive data.

3

Testing

Test the recipe with various scenarios to ensure all dynamic variables, triggers, and conditions work as intended.

Following this process, you can automatically trigger a Thnks gift to be sent as part of a Workato recipe using the HTTP action.

References