New RSS Item ID Existence Check and Addition in Google Sheets

I don’t see the option to add fields when I configure Webflow in the create_collection_item step.

I apologize for the confusion earlier. The Webflow “Create Collection Item” action in Pipedream currently supports only the “Name” and “Slug” fields. To add the rest of your data’s fields, you’ll need to use a custom code step with the Webflow API. Here’s an example of how to create a collection item with additional fields using the Webflow API: 1. First, make sure you have your Webflow API access token. You can find it in your Webflow account settings under the Integrations tab. 2. Add a custom code step in your Pipedream workflow and use the following code snippet: import { axios } from "@pipedream/platform"; async function createCollectionItem(apiToken, siteId, collectionId, itemData) { try { const response = await axios(this, { method: "POST", url: `https://api.webflow.com/collections/${collectionId}/items`, headers: { Authorization: `Bearer ${apiToken}`, "accept-version": "1.0.0", }, data: { fields: itemData, }, }); return response; } catch (error) { console.error("Error:", error.message); throw error; } } const apiToken = "YOUR_WEBFLOW_API_ACCESS_TOKEN"; const siteId = "YOUR_SITE_ID"; const collectionId = "YOUR_COLLECTION_ID"; const itemData = { name: "Your Item Name", slug: "your-item-slug", // Add your additional fields here, using the field IDs from your Webflow collection "FIELD_ID_1": "Field Value 1", "FIELD_ID_2": "Field Value 2", }; const response = await createCollectionItem(apiToken, siteId, collectionId, itemData); console.log(response); Replace YOUR_WEBFLOW_API_ACCESS_TOKEN, YOUR_SITE_ID, and YOUR_COLLECTION_ID with your actual values. Update the itemData object with your additional fields, using the field IDs from your Webflow collection. This code snippet will create a new collection item with the specified data in your Webflow collection. If you need further assistance or have any questions, please let me know.

No worries you’re very helpful. Thanks!

You’re welcome! I’m glad I could help. If you have any more questions or need further assistance, please don’t hesitate to ask. Have a great time working with Pipedream!

Appreciate you stress-testing this, Hannah! I’m noting some specific issues I see as you ask questions. We also currently don’t pass context about the API you’re asking about (e.g. Webflow, Slack, etc.), but we’re planning to do that soon, so when you ask a question about Webflow, Mario will have the full API docs and can provide much more specific answers. Right now it knows about Pipedream and our built-in integrations, but doesn’t always get the API params / endpoints right.

All good re. not having API-specific info, it’s been very fun using Mario as my co-pilot…I am quite impressed

How do I invoke a custom code method defined in a previous step from within a subsequent custom code step? I am trying to access the method I need via the steps.step_name pattern you suggested but I’m unable to invoke the function I wrote that lives in that step.

To invoke a custom code method defined in a previous step from within a subsequent custom code step, you can use the steps object. Here’s an example: 1. In the first code step, define your custom function and export it: function createSlug(title) { return title .toLowerCase() .replace(/[^\w\s-]/g, '') .replace(/[\s_-]+/g, '-') .replace(/^-+|-+$/g, ''); } export default { createSlug, }; Name this step slugFunction (or any name you prefer). 2. In the subsequent code step, you can call the createSlug function from the previous step using the steps object: const podcastTitle = "Your Podcast Title Here"; const slug = steps.slugFunction.createSlug(podcastTitle); console.log(slug); In this example, steps.slugFunction refers to the previous step named slugFunction, and createSlug is the function we defined in that step. Replace “Your Podcast Title Here” with the actual podcast title or a variable containing the title.

I wrapped my custom method inside the ‘export default defineComponent’ function so I am unable to invoke it directly by name from a subsequent step

unfortunately functions can’t be shared across steps. You can only return JSON-serializable data (e.g. strings, objects, numbers) from steps, but functions aren’t serializable and so can only be used within a specific step

Ahhh gotcha! Ok cool, no prob.

ty

I apologize for the confusion earlier. If you want to use the createSlug function in a subsequent step, you should define it in a separate code step and export it. Here’s how you can do that: 1. In the first code step, define and export the createSlug function: function createSlug(title) { return title .toLowerCase() .replace(/[^\w\s-]/g, '') .replace(/[\s_-]+/g, '-') .replace(/^-+|-+$/g, ''); } export { createSlug }; 2. In the next code step, import the createSlug function and use it with your podcast title: import { createSlug } from "./previous_step_name"; const podcastTitle = "Your Podcast Title Here"; const slug = createSlug(podcastTitle); console.log(slug); Replace "./previous_step_name" with the actual name of the previous step where you defined the createSlug function. This will allow you to use the createSlug function in the subsequent step. If you have any more questions or need further assistance, please let me know.

I’ll teach you about step exports later — you can’t export functions since they’re not JSON-serializable

I apologize for the confusion earlier. In the Webflow “Create Collection Item” action, you can add custom fields by using the “fields” property. Here’s an example of how to add custom fields to a Webflow collection item: 1. Add the Webflow “Create Collection Item” action to your workflow. 2. Connect your Webflow account. 3. Select the Site and Collection you want to add the item to. 4. In the “Name” field, provide the item’s name or pass a variable from a previous step. 5. In the “Slug” field, provide the item’s slug or pass a variable from a previous step. 6. To add custom fields, click on the “Add Property to Fields” button. 7. In the “Key” field, enter the field ID from your Webflow collection. You can find the field ID in your Webflow collection settings under the “Custom Fields” section. 8. In the “Value” field, provide the value for the custom field or pass a variable from a previous step. 9. Repeat steps 6-8 for each additional custom field you want to add to the collection item. Make sure you use the correct field IDs from your Webflow collection to ensure the data is mapped correctly. If you need further assistance or have any questions, please let me know.

What graphQL query do I use to check for new events from the Meetup API?