Hi Team - I am using a transformation to send data...
# support
l
Hi Team - I am using a transformation to send data from Rudderstack to customer.io. one of our events captures the submission of an activity to multiple people. this comes in as a single event but in customer.io we want it to trigger the sending of multiple emails. i was thinking that an elegant way to handle this situation would be to have the rudderstack transformation send a separate event to customer.io for each of the recipients. is it possible to use a rudderstack transformation to create multiple outgoing customer.io events from a single incoming rudderstack event? thanks!
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
h
Yes you can return an array of events from a transform
s
You can do this
Copy code
export function transformEvent(event, metadata) {
    const other_event  = {...event}; // Copy Event
    other_event.property = "<Some_value>"; // Rename Properties
    return [event, other_event]; // Return both events
}
🙌🏼 1
🙌 1
l
beautiful. thanks for your help! much appreciated.