with gobio.link and RabbitMQ?
The gobio.link API allows you to create and manage smart links that can redirect users based on various rules like location, device, language, and more. With Pipedream, you can automate processes that involve link creation, performance tracking, and dynamic redirection rules. By integrating the gobio.link API with Pipedream, you can tie its capabilities into workflows that interact with other apps to streamline marketing campaigns, personalize user experiences, and analyze engagement data.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
gobio_link: {
type: "app",
app: "gobio_link",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://gobio.link/api/user`,
headers: {
Authorization: `Bearer ${this.gobio_link.$auth.api_key}`,
},
})
},
})
import amqp from "amqplib";
export default defineComponent({
props: {
rabbitmq: {
type: "app",
app: "rabbitmq",
}
},
async run({ steps, $ }) {
const url = `amqp://${this.rabbitmq.$auth.username}:${this.rabbitmq.$auth.password}@${this.rabbitmq.$auth.host}:${this.rabbitmq.$auth.port}`;
const connection = await amqp.connect(url);
const channel = await connection.createChannel();
const queue = 'Sample Queue';
await channel.assertQueue(queue, { durable: true });
const message = 'Welcome RabbitMQ + Pipedream users! ' + new Date().toISOString()
channel.sendToQueue(queue, Buffer.from(message), { persistent: true });
console.log(`Sent: ${message}`);
const queueInfo = await channel.checkQueue(queue);
return queueInfo;
},
})