Can the Webflow URL Where the Webflow Form was Filled Out be Retrieved Using the Site ID?

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

Is there a way to pull t he Webflow URL where the Webflow form was fillet out using the site ID?

To pull the Webflow URL where a form was filled out using the site ID, you can use the Webflow API to retrieve form submissions and extract the relevant information. Below is an example Pipedream component that demonstrates how to achieve this: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { webflow: { type: “app”, app: “webflow”, }, siteId: { type: “string”, label: “Site ID”, }, }, async run({ steps, $ }) { // Fetch form submissions for the specified site const response = await axios($, { url: https://api.webflow.com/sites/${this.siteId}/forms, headers: { Authorization: Bearer ${this.webflow.$auth.oauth_access_token}, “accept-version”: 1.0.0, }, }); // Extract the URL from the form submissions const formSubmissions = response.data; const urls = formSubmissions.map(submission => submission.data.url); return urls; }, });

Is there a way to pull t he Webflow URL where the Webflow form was fillet out using the event ID?

To pull the Webflow URL where a Webflow form was filled out using the event ID, you can use the Webflow API to fetch the details of the form submission. Here’s how you can do it using a Pipedream component: 1. Create a new Pipedream workflow. 2. Add a trigger (e.g., HTTP trigger) to start the workflow. 3. Add a code step to fetch the form submission details from Webflow. Here’s an example Pipedream component that fetches the form submission details using the event ID: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { webflow: { type: “app”, app: “webflow”, }, eventId: { type: “string”, label: “Event ID”, }, }, async run({ steps, $ }) { const response = await axios($, { url: https://api.webflow.com/sites/${this.webflow.$auth.site_id}/forms/${this.eventId}, headers: { Authorization: Bearer ${this.webflow.$auth.oauth_access_token}, “accept-version”: 1.0.0, }, }); const formSubmissionDetails = response.data; const formUrl = formSubmissionDetails.url; // Assuming the URL is part of the response return formUrl; }, });

Is there a way to pull t he Webflow page slug where the Webflow form was fillet out using the event ID?

To pull the Webflow page slug where the Webflow form was filled out using the event ID, you can use the Webflow API to fetch the form submission details and extract the page slug from the response. Here’s a Pipedream component that demonstrates how to achieve this: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { webflow: { type: "app", app: "webflow", }, eventId: { type: "string", label: "Event ID", }, }, async run({ steps, $ }) { const response = await axios($, { url: `https://api.webflow.com/collections/${this.eventId}`, headers: { Authorization: `Bearer ${this.webflow.$auth.oauth_access_token}`, "accept-version": `1.0.0`, }, }); // Assuming the page slug is in the response, adjust the path as needed const pageSlug = response.slug; return pageSlug; }, }); ### Instructions to use this component: 1. Search for the Webflow app from the trigger menu. 2. Select the New Form Submission trigger. 3. Connect your Webflow account. 4. Add a new action step and paste the above code. 5. Provide the Event ID as an input to the component. This component will make an API request to Webflow to fetch the details of the form submission using the event ID and extract the page slug from the response. Adjust the response path (response.slug) as needed based on the actual API response structure. If you need further assistance or encounter any issues, please visit Support - Pipedream for more support options.

Is there a way to pull t he Webflow page slug where the Webflow form was fillet out using the site ID?

To pull the Webflow page slug where a Webflow form was filled out using the site ID, you can use the Webflow API to fetch the details of the forms and their associated pages. Below is an example Pipedream component that demonstrates how to achieve this: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { webflow: { type: "app", app: "webflow", }, siteId: { type: "string", label: "Site ID", }, }, async run({ steps, $ }) { // Fetch the list of forms for the given site const forms = await axios($, { url: `https://api.webflow.com/sites/${this.siteId}/forms`, headers: { Authorization: `Bearer ${this.webflow.$auth.oauth_access_token}`, "accept-version": `1.0.0`, }, }); // Assuming you want to get the page slug for the first form submission const formId = forms[0]._id; // Fetch the form submissions const submissions = await axios($, { url: `https://api.webflow.com/forms/${formId}/submissions`, headers: { Authorization: `Bearer ${this.webflow.$auth.oauth_access_token}`, "accept-version": `1.0.0`, }, }); // Assuming you want to get the page slug for the first submission const submission = submissions[0]; const pageId = submission.pageId; // Fetch the page details to get the slug const page = await axios($, { url: `https://api.webflow.com/sites/${this.siteId}/pages/${pageId}`, headers: { Authorization: `Bearer ${this.webflow.$auth.oauth_access_token}`, "accept-version": `1.0.0`, }, }); return page.slug; }, }); ### Explanation: 1. Props: The component takes two props: webflow for the Webflow app connection and siteId for the Webflow site ID. 2. Fetching Forms: The component fetches the list of forms for the given site using the Webflow API. 3. Fetching Submissions: It then fetches the form submissions for the first form. 4.