Temporary space for work (Rasika)
TikTok Shop connector allows you integrate with TikTok Shop in Tray.io and improve operational efficiency.
Dynamics 365
Creating your Authentication in Tray
There are two ways to authenticate the Microsoft Dynamics 365 connector:
OAuth 2 Authentication
OAuth 2 authentication requires your Dynamics 365 URL:
Click Next to sign into your Microsoft account and complete the OAuth flow.
IMPORTANT: The permissions that Tray will request will exactly mirror those of your configured role in Dynamics 365 (set up according to the above guidelines).
The Azure Active Directory administrator should be able to confirm the permissions delegated to the app in Azure Active Directory under Azure Active Directory > Users > Click on the specific user > Applications > Click on the app > View Granted Permissions
OAuth 2 with client credentials
OAuth 2 with client credentials authentication requires Dynamics 365 URL, Client ID, Client Secret, Tenant ID, and Scope parameters.
Locate your Client ID and Client Secret, and Tenant ID by accessing your Microsoft Dynamics app in Azure Active Directory.
The Microsoft Dynamics 365 service requires a scope in the following format: <Dynamics 365 URL>/.default
, e.g. https://org0df2d90b.crm11.dynamics.com/.default.
Add these fields to your Tray.io authentication popup window.
Click **Create authentication. **Go back to your settings authentication field (within the workflow builder properties panel), and select the recently added authentication from the available dropdown options .
Your connector authentication setup is now complete.
sdasdasdsadasd
Open AI doc
OpenAI function calling + chat completion
One of the powerful feature of the Chat Completion operation is the ability to call functions directly within the OpenAI workflow step. This capability allows you to execute specific tasks or calculations and incorporate the results into your chat responses seamlessly. For more information, refer to OpenAI's function calling. For an example consider the SimpleMath tool function:
def simple_math_tool(operation, num1, num2):
if operation == "add":
return num1 + num2
elif operation == "subtract":
return num1 - num2
else:
return "Invalid operation. Please use 'add' or 'subtract'."
# Example usage:
result = simple_math_tool("add", 5, 3)
print(result) # Output: 8
To call this function in your workflow you need to define a following simple schema for the tool under Advanced properties:
{
"type": "object",
"properties": {
"operation": \{
"type": "string",
"description": "The arithmetic operation to perform (add or subtract)."
\},
"num1": \{
"type": "number",
"description": "The first number."
\},
"num2": \{
"type": "number",
"description": "The second number."
\}
},
"required": [
"operation",
"num1",
"num2"
]
}
Once done the next step is to call the function SimpleMath tool.
The **Response Type **field has two parameters JSON Object and Text. **
Note: When setting the Response Type field to
JSON Object
, ensure the User message contains the word json
. If not, an error message will be received.
Once run successfully the output should be:
How to document a workflow
You can annotate your workflow, add TODOs, instructions, links or images by filling out the Workflow description field. You can find the description field:
- In the builder, in the left-hand side Workflow info panel, when you click Edit.
- In the builder, under “Workflow settings”
- In the workflow creation modal
- In the workflows list, when you choose Quick edit for a chosen workflow. The description is then exposed in the Workflow info panel inside the builder (left hand side menu).
For special formatting, lists, images and links you can use markdown.
Please see our guide on how to use markdown for a full list of available markdown features.
Example:
This is the source markdown that results in the description above:
This workflow captures leads from a CSV file and uses these to create contacts in HubSpot as per [this JIRA ticket](https://tray.io)
[![Image alt text] (https://images.ctfassets.net/p3dvvupz8xw4/2qMBaEVZfovsTFHzuZtYhc/d316700f915c3c25c99539a3e4d7fae2/csv-hb-result.png)](https://tray.io/)
On every update an email gets sent to the Marketing team *marketing@ourcompany.com*
Here is the feature flag key used for this functionality:
Example-feature-flag-230413
---
**TODO:**
- ~~Add Slack message confirmation~~ (done by Chris, 17 Apr)
- Attach the CSV to the email
Slack
Authentication
Starting from version 10, Slack connector uses the modern app, while version 9.1 uses the classic app. Due to differences in behavior, we recommend creating separate authentications for each version. Refer to Slack's Differences between classic and modern Slack apps document for more details.
App creation
Old vs New Slack Apps
Please be aware that Tray.io currently uses of Slack's OAuth 1.0 flow and works with Classic Apps only. This means when you are building we recommend you do so according to Classic App guidelines and alongside classic Scopes. More details can be found here. If you wish to build using Slack's OAuth 2.0 flow and use "New Slack App methodology" it would be best to build this using our custom service guidelines and use the HTTP Client connector for Slack operations.