How to Create a Row in Supabase from Two Columns Extracted from XML?

This topic was automatically generated from Slack. You can find the original thread here.

Hello.
I’m trying to build a flow that creates a row in Supabase from 2 columns extracted from a XML. I’ve tried lots of different ways, but with no success. I keep getting null as output. Does anyone know a way to solve this, please?

To help you build a flow that creates a row in Supabase from 2 columns extracted from an XML, you can follow these steps: 1. Extract Data from XML: Use a code step to parse the XML and extract the required columns. 2. Insert Row into Supabase: Use the “Insert Row” action in the Supabase app to insert the extracted data into your Supabase table. Here’s a detailed guide on how to achieve this: ### Step 1: Extract Data from XML First, you need to parse the XML and extract the required columns. You can use a Node.js code step to do this. Here’s an example of how to parse XML and extract data using the xml2js library: import { parseStringPromise } from 'xml2js'; export default defineComponent({ async run({ steps, $ }) { const xmlData = steps.trigger.event.body; // Assuming the XML data is in the trigger event body // Parse the XML data const result = await parseStringPromise(xmlData); // Extract the required columns (adjust the path based on your XML structure) const column1 = result.root.column1[0]; const column2 = result.root.column2[0]; // Return the extracted data return { column1, column2 }; }, }); ### Step 2: Insert Row into Supabase Next, use the “Insert Row” action in the Supabase app to insert the extracted data into your Supabase table. 1. Search for the Supabase app from the step menu. 2. Select the Insert Row action. 3. Connect your Supabase account. 4. Select a Table or pass a string from a previous step. 5. Select a Row Data or pass an object from a previous step. 6. At the bottom of the step, click Test to run the action and test the configuration. Here’s an example of how to configure the “Insert Row” action: ``` import { axios } from “@pipedream/platform”; export default defineComponent({ props: { supabase: { type: “app”, app: “supabase”, }, table: { type: “string”, label: “Table”, }, }, async run({ steps, $ }) { const { column1, column2

Thanks. I’ve read these before posting here and they don’t solve the issue, unfortunately.