# Workflows - convert JSON into the BizEvents format

**URL:** <https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881>\
**Category:** Automations\
**Tags:** workflows\
**Created:** [May 12, 2026, 11:41am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881 "2026-05-12T11:41:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmehta3](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@tmehta3](https://community.dynatrace.com/u/tmehta3)\
**Post date:** [May 12, 2026, 11:41am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/1 "2026-05-12T11:41:47Z")

</div>

Hello Community,

I am working on creating a Dynatrace workflow where I start with **sample JSON data** and need to convert that JSON into the **BizEvents format** so it can be ingested into Grail.

Could you please help me with the correct JavaScript structure for this conversion? Here’s the sample JSON I am working with and the code I have so far:

javascriptBecause when i am ingesting and fetching bizevents through DQL I am getting No records found in the dashboards  
The approach I have used is - Trigger-\>Javascript-\>Ingest Business events

```auto
function main() {
  // Sample JSON data
  const data = {
    requestId: "12345",
    dateTime: "2024-04-22T14:30:00.000Z",
    totalProxies: 100,
    proxyList: [
      {
        proxyName: "ddd",
        environment: "hhh",
        revision: 1,
        created: "2024-04-22T14:30:00.000Z",
        lastModified: "2024-04-22T14:30:00.000Z",
        basePath: "/basePath",
        deployState: true,
        TargetServer: ["Server1", "Server2"],
        targetEndpoint: ["/Service1", "/Service2"],
        sharedFlows: ["sgg", "sgg"]
      }
    ]
  };

  // Convert each proxy into a BizEvent
  return data.proxyList.map(proxy => ({
    "event.provider": "apigee",
    "event.type": "apigee.proxy.metadata",
    "event.category": "inventory",
    attributes: {
      bucket: "test-poc", // custom marker
      requestId: data.requestId,
      dateTime: data.dateTime,
      totalProxies: data.totalProxies,
      proxyName: proxy.proxyName,
      environment: proxy.environment,
      revision: proxy.revision,
      created: proxy.created,
      lastModified: proxy.lastModified,
      basePath: proxy.basePath,
      deployState: proxy.deployState,
      targetServers: proxy.TargetServer,
      targetEndpoints: proxy.targetEndpoint,
      sharedFlows: proxy.sharedFlows
    }
  }));}

```

### 🔹 My Questions

1. Is this the correct way to structure BizEvents JSON in a workflow JavaScript step?
2. Do I need to add or change any mandatory fields for Grail ingestion?
3. Are there best practices for handling multiple proxies in the array (e.g., batching vs individual events)?

Thanks in advance for your guidance!

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [May 12, 2026, 12:29pm UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/2 "2026-05-12T12:29:56Z")

</div>

Hi,

Since you are in Managed… Are workflows available in your environment?

Best regards

---

<div class="post-metadata">

**Author:** ![tmehta3](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@tmehta3](https://community.dynatrace.com/u/tmehta3)\
**Post date:** [May 12, 2026, 12:31pm UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/3 "2026-05-12T12:31:31Z")

</div>

Yes workflows are available in my environment . I am working on staging now

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [May 12, 2026, 4:03pm UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/4 "2026-05-12T16:03:26Z")

</div>

Hi,

I was not aware workflows were available in Managed environment… Are you in SaaS?

Best regards

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [May 13, 2026, 6:35am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/5 "2026-05-13T06:35:28Z")

</div>

It is definitely SaaS. Workflows are SaaS only feature.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [May 13, 2026, 7:51am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/6 "2026-05-13T07:51:27Z")

</div>

[@tmehta3](https://community.dynatrace.com/user/96104)&nbsp;I’m not sure what issue you are trying to solve. Maybe a different option of raising business events - (in OpenPipeline) may fit your case better. Be aware that workflows have some execution limitations and you may run in throttling issues if your workflow is executed too often.

For an example to raise a bizevent from JavaScript in the platform, see&nbsp;[Classic environment v2 | Dynatrace Developer](https://developer.dynatrace.com/develop/sdks/client-classic-environment-v2/#businesseventsclient)&nbsp;(example included).  
As then it comes to the data:

- You need the mandatory fields - event.provider and event.type at least with event.category being recommended
- Follow the semantic dictionary -&nbsp;[Business Analytics — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/semantic-dictionary-business-analytics#business-events-fields)&nbsp;and I recommend following that in general for your attributes&nbsp;[Global field reference — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/semantic-dictionary-global-field-reference)&nbsp;(typically fields such as url.path for example)
- If you really need workflow and you want to create multiple events from a single execution, send multiple events in a batch

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [May 13, 2026, 7:58am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/7 "2026-05-13T07:58:33Z")

</div>

Hi there,

I’ve checked this on my own demo environment, I am able to ingest this event via:

```javascript
/*
* This function will run in the DYNATRACE JavaScript runtime.
* For information visit https://dt-url.net/functions-help
*/
import { businessEventsClient } from '@dynatrace-sdk/client-classic-environment-v2';

export default async function () {

  // Sample JSON data
  const data = {
    requestId: "12345",
    dateTime: "2024-04-22T14:30:00.000Z",
    totalProxies: 100,
    proxyList: [
      {
        proxyName: "ddd",
        environment: "hhh",
        revision: 1,
        created: "2024-04-22T14:30:00.000Z",
        lastModified: "2024-04-22T14:30:00.000Z",
        basePath: "/basePath",
        deployState: true,
        TargetServer: ["Server1", "Server2"],
        targetEndpoint: ["/Service1", "/Service2"],
        sharedFlows: ["sgg", "sgg"]
      }
    ]}

  console.log(data);

  // Convert each proxy into a BizEvent
  const mapEvent = data.proxyList.map(proxy => ({
    "event.provider": "apigee",
    "event.type": "apigee.proxy.metadata",
    "event.category": "inventory",
    "attributes": {
      bucket: "test-poc", // custom marker
      requestId: data.requestId,
      dateTime: data.dateTime,
      totalProxies: data.totalProxies,
      proxyName: proxy.proxyName,
      environment: proxy.environment,
      revision: proxy.revision,
      created: proxy.created,
      lastModified: proxy.lastModified,
      basePath: proxy.basePath,
      deployState: proxy.deployState,
      targetServers: proxy.TargetServer,
      targetEndpoints: proxy.targetEndpoint,
      sharedFlows: proxy.sharedFlows
    }
  }));
  console.log(mapEvent)

businessEventsClient
  .ingest({
    body: mapEvent,
    type: 'application/json',
  })
  .then(() => console.log('Event ingested'))
  .catch((e) => console.error('Failed to ingest event: ' + e));

}

```

The event pops up in my environment, could you verify whether you are doing the same steps?

 ![michiel_otten_0-1778659090419.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/17b2f4555310a377c81e47a0abba9a399f85df53.png)

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [May 13, 2026, 8:01am UTC](https://community.dynatrace.com/t/workflows-convert-json-into-the-bizevents-format/55881/8 "2026-05-13T08:01:44Z")

</div>

Hi,

I have just moved this thread to “Automations” thread instead of Managed.

Best regards
