# Linking Macro with external DB

**URL:** https://community.egain.com/t/linking-macro-with-external-db/927
**Category:** Knowledge Hub
**Created:** [May 24, 2022, 4:06pm UTC](https://community.egain.com/t/linking-macro-with-external-db/927 "2022-05-24T16:06:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Avante](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Avante](https://community.egain.com/u/Avante)
#### Post date: [May 24, 2022, 4:06pm UTC](https://community.egain.com/t/linking-macro-with-external-db/927/1 "2022-05-24T16:06:37Z")

</div>

Hello Support Team,

Can a macro be linked with an external db (i.e. outside eGain, connecting the customer’s database via VPN) in eGain and as well be used within an article in eGain such that when ever the article is used as an auto response to received emails, the macro will be executed using the customer’s email address? If this can be done, kindly advice on the steps to take or a guide pointing to pages that addressed it. Will appreciate your response at the earliest. Thanks.

---

<div class="post-metadata">

### Author: ![Shalini](https://sea1.discourse-cdn.com/flex019/user_avatar/community.egain.com/shalini/32/7_2.png) [@Shalini](https://community.egain.com/u/Shalini)
#### Post date: [May 25, 2022, 7:16pm UTC](https://community.egain.com/t/linking-macro-with-external-db/927/2 "2022-05-25T19:16:08Z")

</div>

Hi,

The SME says: Macros can be defined for data adapters and those macros can be used in article content, just like an article or business object macro. However, JDBC data adapters are no longer available in R21 – data adapters are now limited to REST APIs.
