Skip to content
FlowHubFluxonLab
C
Microsoft SQLfree

Sync SAP sales project fields between Microsoft SQL and Asana

by n8n Labadapted from n8n official workflow galleryUpdated Aug 2026
RequiresCCodeHTTP RequestHTTP RequestMicrosoft SQLMicrosoft SQL
Share Post Share
ScHourly Schedule TriggerHourly Schedule…MSQuery Unsynced ProjectsQuery Unsynced …FiAny Records to Sync?Any Records to …MSMark as ProcessingMark as Process…CoPass Project ContextPass Project Co…HRGet Portfolio Projects from AsanaGet Portfolio P…CoMatch Project by NameMatch Project b…IfProject Found in Asana?Project Found i…HRGet Project Custom FieldsGet Project Cus…CoBuild Custom Fields PayloadBuild Custom Fi…HRUpdate Asana Project FieldsUpdate Asana Pr…MSSQL — Mark Project CompletedSQL — Mark Proj…MSSQL — Mark Waiting for Project IDSQL — Mark Wait…CoHandle Project Update ErrorHandle Project …MSSQL — Mark Project FailedSQL — Mark Proj…1234567891011121314
1/5
STEPS · 14
Runs on a schedule

Quick overview This workflow runs hourly to sync project records from a Microsoft SQL Server staging table into matching Asana projects, updating Asana custom fields and writing back sync status, errors, and the Asana project ID to the database. How it works Runs every hour and queries Microsoft SQL Server for up to 100 project records that are not yet synced (or previously failed) and have fewer than three sync attempts. Marks each selected record as “Processing” in SQL Server to prevent duplicate handling during the sync. Calls the Asana API to list projects in a specific portfolio and matches the SQL ProjectName to an Asana project name. If no Asana project matches, updates the SQL record to a “Waiting for Project ID” state with a message for manual project creation. If a match is found, retrieves the Asana project’s custom fields and builds an update payload mapping SQL values (manager, margin, revenue, costs, and dates) to Asana custom fields. Updates the Asana project via the Asana API and then marks the SQL record as “Completed” with the Asana project ID, or logs the error and marks the record as “Failed” while incrementing the attempt counter.

Tags

n8nreference-onlymicrosoft-sql
Connects
CCodeWHTTP RequestmicrosoftsqlMicrosoft SQL
CategoryMicrosoft SQL
Triggermanual
Complexitycomplex
Nodes15
AddedJul 17, 2026