AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { webflowAuth } from '../auth';
import { webflowClient } from '../common/client';
import { webflowProps } from '../common/props';
import { orderOutputSchema } from '../output-schemas';
export const refundOrderAction = createAction({
auth: webflowAuth,
outputSchema: orderOutputSchema,
name: 'refund_order',
classification: 'DESTRUCTIVE',
description: 'Refund order',
displayName: 'Refund an order',
audience: 'both',
aiMetadata: { description: 'Issues a refund for an existing Webflow Ecommerce order, identified by site ID and order ID. Use to reverse a customer payment. This moves money and is not idempotent — repeating it risks duplicate refund attempts, so call it once per order.', idempotent: false },
props: {
site_id: webflowProps.siteId({ required: true }),
order_id: webflowProps.orderId({ required: true }),
},
async run(context) {
const orderId = context.propsValue.order_id;
const siteId = context.propsValue.site_id;
return await webflowClient.request<unknown>({
auth: context.auth,
method: HttpMethod.POST,
path: `/v2/sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/refund`,
});
},
});