The **Data Source** node allows you to connect your workflow to external data sources, such as databases, APIs, or third-party services. With the **Data Source** node, you can:
- Retrieve data from databases like PostgreSQL, MySQL, or MongoDB
- Fetch information from REST or GraphQL APIs
- Integrate with SaaS platforms such as ClickUp, Salesforce, or Slack
- Perform queries, filters, or transformations before passing data to other nodes
The **Data Source** node is essential for building dynamic workflows that depend on real-time data. It enables enterprise-level automation, reporting, and decision-making by seamlessly bringing external data into your workflow.
Each **Data Source** node has specific configurations based on its type:
For this example, the workflow receives input data in the following structure:
```js
{
"from": "johndoe@example.com",
"name": "John Doe",
"data": "Hi, I've been using ToolJet and it's the best tool in the market!"
}
```
This payload comes from the source that triggers the workflow. In this case, the workflow is triggered through a Webhook, so the incoming request body provides this data. However, the same workflow could also be triggered by other sources such as another workflow or a ToolJet application as long as they send parameters in this format.
**Step 1** : From the Trigger node, drag a connection and add an OpenAI data source node. Name this node `generateResponse`.
**Step 2** : Select the _Operation_ and _Model_ and configure the prompt.
Example prompt:
```
You are a customer support representative at ToolJet. Write a response to the following ticket that the customer raised.
Ticket Data - {{startTrigger.params.data}}
Strictly provide only a JSON with the following structure without any fillers or markdown.