Back to Blog

Automating workflows for marketing teams using Notion and n8n

WorkplaceTechnology
Automation
Two people working on computers, photographed from above with red carpet and lots of plants

At LeftBrain, we pride ourselves on empowering clients through sophisticated process automations and AI-powered workflows, enabling them to achieve peak operational efficiency seamlessly. Recently, a retailer enlisted our expertise to demonstrate the integration and automation of their marketing databases within Notion, aiming to streamline their copywriting processes. This task aligned perfectly with our technical proficiencies.

The company already had established Notion databases for campaigns and copywriters. Our primary objective was to devise and document methodologies for the automated assignment of copywriters to marketing campaigns, leveraging specific key attributes such as writer availability and domain expertise. During our conceptual discussions, we suggested the addition of a campaign types database. This addition provided a straightforward approach to linking the existing campaigns and copywriters databases, ensuring each copywriter was allocated tasks aligned with their specialty.

First, we set up a demo environment on Notion to illustrate how the new setup could work. To implement the automation, we utilised n8n, a powerful automation tool with built-in connectors to Notion. Our goal was to monitor updates to Notion pages and trigger actions to retrieve and process related records via Notion API interactions. Notion’s lack of native webhooks required us to employ the n8n pre-built trigger, which checks the database every minute for changes, subsequently returning the modified pages. Despite introducing a minor delay, this approach was an effective alternative.

The final workflow as seen in n8n.

The configuration of triggers involved leveraging n8n's pre-built Notion trigger node, designed to address the absence of native webhook support in Notion. This node employs a polling mechanism, querying the Notion database at one-minute intervals for updates. We utilised conditional logic within n8n to ensure that only fully populated records triggered downstream workflows. This approach ensured robust and efficient monitoring of database changes without the need for custom webhook implementations, optimising performance and accuracy.

The Notion page data returned by the trigger node. Note the array of page IDs returned for the related database "Campaign Type".

The data flow was meticulously defined, working backwards from the desired outcome to incorporate all necessary steps. This involved setting up an API key through Notion’s developer portal and creating a Notion credential within n8n. Through extensive trial and error, we tested various n8n nodes to manipulate the incoming data effectively, ensuring alignment with client objectives. Prebuilt Notion nodes were employed to retrieve the campaign type from the trigger and the associated copywriters' details. This step was crucial due to Notion's API returning related properties as page IDs, necessitating additional API calls to fetch detailed page information.

The status property updated to show no availability allowing us to utilise Notion features to create a separate view to these pages and Slack notifications when they are assigned this status.

We planned for scenarios where no suitable copywriters were available, ensuring the system could handle such cases gracefully. If no copywriters met the criteria, the system updated the campaign status to indicate assignment failure, necessitating manual intervention.

Our system design prioritised flexibility. The separate database for campaign types allowed for the easy addition or removal of types without disrupting the integration’s functionality. Adjusting copywriter availability posed more complexity. While the system accounted for adjusting the available time for each copywriter, further improvements could be achieved by integrating a time management platform. This would enable real-time scheduling adjustments based on current workload, enhancing scheduling accuracy.

User permissions and data security were meticulously managed throughout the integration process, ensuring a robust and secure system. Comprehensive testing using mock data validated the automation logic across various conditions, reinforcing system reliability.

Upon implementation, the automation workflow enabled clients to create new campaigns by specifying the projected hours required and selecting a campaign type. Within seconds, the system automatically assigned a copywriter based on expertise and availability. This streamlined process not only saved time but also ensured efficient resource allocation, significantly enhancing overall team productivity.

By leveraging Notion and n8n, we delivered a robust automation solution tailored to the company's needs while prioritising user experience. At LeftBrain, we often state that ‘technology that “just works” is hard work.’ Through meticulous planning, testing, and execution, we achieved seamless integrations that elevate workflows and appear effortlessly efficient.

In conclusion, by addressing key properties for matching copywriters to campaigns, overcoming the limitations of Notion’s webhooks, and ensuring data integrity and consistency, we refined the overall automation strategy. This resulted in a powerful tool that significantly enhanced the retailer's marketing workflows, demonstrating our technical expertise and commitment to delivering high-quality automation solutions.

Would you like to automate business processes and streamline workflows?

Schedule a Call
Green arrow

Read Next

Alan Avins
Alan Avins
Tuesday 23rd July
Services
No items found.